Detection methods for photovoltaic module defects

Calculate the size defects of photovoltaic modules by image edge detection method, solve the problem of inaccurate detection in the prior art, and improve the product pass rate and service life of photovoltaic modules.

CN114627041BActive Publication Date: 2025-01-07ZHEJIANG CHINT ELECTRIC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011447939.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-11
Publication Date
2025-01-07
Estimated Expiration
2040-12-11

AI Technical Summary

Technical Problem

The prior art is difficult to quickly and accurately detect dimensional defects of photovoltaic modules, affecting the aesthetics and service life of the modules.

Method used

By using an image edge detection method, by obtaining the grayscale image of the photovoltaic module, calculating the total width and total height of the battery cell, determining the edge line, storing the vertex coordinates, calculating the chip spacing, string spacing and misalignment values, and determining whether it is within the threshold range. to determine the defect.

Benefits of technology

It realizes rapid and accurate detection of dimensional defects of photovoltaic modules, and improves the product's pass rate and service life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114627041B_ABST
    Figure CN114627041B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of photovoltaic module detection, and in particular to a method for detecting defects in photovoltaic modules, in particular to a method for detecting size defects in photovoltaic modules based on image edge detection. The method can calculate the spacing between cells in an image of a photovoltaic module through group cutting, arithmetic difference calculation, statistical summation, sobel calculation and other algorithms, thereby judging whether the arrangement of the cells is accurate. The method can quickly and accurately find the size defects of photovoltaic modules, so as to repair the corresponding products in the production line, thereby improving the qualified rate of photovoltaic module products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photovoltaic module detection, and in particular to a method for detecting defects in photovoltaic modules, and in particular to a method for detecting size defects in photovoltaic modules based on image edge detection. Background Art

[0002] The quality rate and aesthetics of photovoltaic modules are closely related to the spacing between the cells of the photovoltaic modules. If the spacing between the cells does not meet the standards, it will at least affect the aesthetics of the photovoltaic module, and at worst cause the creepage distance on the photovoltaic module to be too large or too small. The creepage distance affects static electricity, and a creepage distance that is too small will cause static electricity breakdown, ultimately affecting the service life of the photovoltaic module. Summary of the invention

[0003] The purpose of the present invention is to overcome the defects of the prior art and provide a method for detecting defects of photovoltaic modules, which can accurately and quickly find the size defects of photovoltaic modules.

[0004] To achieve the above object, the present invention adopts the following technical solutions:

[0005] A method for detecting defects in a photovoltaic module comprises the following steps:

[0006] Step 1, obtaining a photovoltaic module image of the photovoltaic module and graying it to obtain a grayscale image grayImg of the photovoltaic module; the grayscale image grayImg of the photovoltaic module has a width of grayImgWidth and a height of grayImgHeight, and the cells on the grayscale image grayImg of the photovoltaic module are distributed in cellColNum rows × cellRowNum columns;

[0007] According to the grayscale image grayImg of the photovoltaic module, the total width cellallwidth of a single row of cells and the total height cellallheight of a single column of cells are calculated; the total width cellallwidth of a single row of cells is the sum of the widths of all cells in the row and the total inter-cell spacing, where the inter-cell spacing is the spacing between adjacent cells in the same row of cells; the total height cellallheight of a single column of cells is the sum of the heights of all cells in the column and the total string spacing, where the string spacing is the spacing between adjacent cells in the same column of cells;

[0008] Step 2: Calculate the edge lines of each cell according to the total width cellallwidth and the total height cellallheight obtained in step 1; the edge lines include inter-cell edge lines and inter-string edge lines, the inter-cell edge lines include two edge lines in the cell height direction, and the inter-string edge lines include two edge lines in the cell width direction;

[0009] Step 3, storing the vertex coordinates of each battery cell according to the edge line of each battery cell;

[0010] Step 4, based on the vertex coordinates of each battery cell, calculate the cell spacing, string spacing and misalignment value; if the cell spacing is within the cell spacing threshold range, it is qualified, and if it exceeds the cell spacing threshold range, it is unqualified; if the string spacing is within the string spacing threshold range, it is qualified, and if it exceeds the string spacing threshold range, it is unqualified; if the misalignment value is within the misalignment value threshold range, it is qualified, and if it exceeds the misalignment value threshold range, it is unqualified.

[0011] Preferably, the step 1 includes the following sub-steps:

[0012] Step 1, obtaining a photovoltaic module image of a photovoltaic module and graying it to obtain a photovoltaic module grayscale image grayImg;

[0013] Step 2, divide the photovoltaic module grayscale image grayImg in proportion, take 1 / cellColNum in the height direction of the photovoltaic module grayscale image grayImg to obtain the image pc2Xw_qlist, and take 1 / cellRowNum in the width direction of the photovoltaic module grayscale image grayImg to obtain the image tr1Yh_qlist;

[0014] Step 3, according to the image pc2Xw_qlist and the image tr1Yh_qlist, obtain the edge line histogram colHistogram and the edge line histogram rowHistogram respectively;

[0015] Step 4: Calculate the total width cellallwidth of a single row of cells based on the edge line histogram colHistogram; calculate the total height cellallheight of a single column of cells based on the power line histogram rowHistogram.

[0016] Preferably, in step 3, for the image pc2Xw_qlist, the matrix colHistogram is obtained by vertical cumulative summing, and the edge line histogram colHistogram is drawn based on the matrix colHistogram; for the image tr1Yh_qlist, the matrix rowHistogram is obtained by horizontal cumulative summing, and the edge line histogram rowHistogram is drawn based on the matrix rowHistogram.

[0017] Preferably, step 4 further comprises the following sub-steps:

[0018] Step 41, get X1 n , X1 nIt is a one-dimensional array obtained by arithmetic subtraction after grouping the edge line histogram colHistogram into groups of n0 pixels. Each value in the one-dimensional array is the value obtained by arithmetic subtraction. According to X1 n Calculate the left edge line LeftEdge and the right edge line reghtEdge of the image pc2Xw_qlist of a single row of cells; 20≤n0≤100;

[0019] Step 42, get X2 n , X2 n It is a one-dimensional array obtained by arithmetic subtraction after grouping the edge line histogram rowHistogram into n0 pixels. Each value in the one-dimensional array is the value obtained by arithmetic subtraction. According to X2 n Calculate the upper edge line topEdge and the lower edge line bottomEdge of the image tr1Yh_qlist of a single row of cells;

[0020] Step 43, calculate the total width cellallwidth according to the left edge line LeftEdge and the right edge line reghtEdge of the image pc2Xw_qlist; calculate the total height cellallheight according to the top edge line topEdge and the bottom edge line bottomEdge of the image tr1Yh_qlist.

[0021] Preferably, the step 2 includes the following sub-steps:

[0022] Step 5, according to the total width cellallwidth and the total height cellallheight, respectively calculate the width cellwidth and height cellheight of the battery cell; according to the width cellwidth of the battery cell and the edge line histogram rowHistogram, obtain the column dividing line cellX, each column of battery cells has a column dividing line cellX on both sides, and there is a column dividing line cellX between two adjacent columns of battery cells; according to the height cellheight of the battery cell and the edge line histogram colHistogram, obtain the row dividing line cellY, each row of battery cells has a row dividing line cellY on both sides, and there is a row dividing line cellY between two adjacent rows of battery cells;

[0023] Step 6, according to the column dividing line cellX and the row dividing line cellY, determine the column reference line coordinated with each column dividing line cellX and the row reference line coordinated with each row dividing line cellY; according to the column dividing line cellX, the column reference line, the row dividing line cellY and the row reference line, determine the inter-sheet dividing line and the inter-string dividing line, the inter-sheet dividing line is the dividing line between adjacent battery cells in the same single column of battery cells, and the inter-string dividing line is the dividing line between adjacent battery cells in the same single row of battery cells;

[0024] Step 7, determining an edge line region for calculating the edge line of the battery cell according to the inter-chip dividing lines and the inter-string dividing lines, as well as the column reference lines and the row reference lines, wherein the edge line region corresponds to the edge line of the battery cell one-to-one, and the edge line region includes an inter-chip edge line region and an inter-string edge line region;

[0025] Step 8: Calculate the edge line corresponding to each edge line region based on the edge line region.

[0026] Preferably, step 5 includes the following sub-steps:

[0027] Step 51, calculating the width cellwidth and the height cellheight of the cell according to the total width cellallwidth and the total height cellallheight;

[0028] Step 52, calculate the X coordinate cellX of each column dividing line cellX according to the cell width cellwidth and the edge line histogram rowHistogram n ; Calculate the Y coordinate cellY of each row dividing line cellY based on the cell height cellheight and the edge line histogram colHistogram n ;

[0029] Step 53: set the X coordinate cellX obtained in step 52 n and the Y coordinate cellY n , respectively draw the grayscale image grayImg of the photovoltaic module to obtain the column dividing line cellX and the row dividing line cellY.

[0030] Preferably, step 6 comprises the following sub-steps:

[0031] Step 61, according to each of the column dividing lines cellX and the width of the battery cell, two groups of column reference lines corresponding to the column dividing line cellX are calculated, and each group of column reference lines includes two column reference lines located on both sides of the column dividing line cellX; according to each of the row dividing lines cellY and the height of the battery cell, two groups of row reference lines corresponding to the row dividing line cellY are calculated, and each group of row reference lines includes two row reference lines located on both sides of the row dividing line cellY;

[0032] Step 62, determining the inter-slice dividing line area and the inter-string dividing line area respectively according to the column dividing line cellX, the column reference line, the row dividing line cellY and the row reference line;

[0033] Step 63, according to the inter-sheet dividing line area and the inter-string dividing line area, respectively calculate the inter-sheet dividing line and the inter-string dividing line, the inter-sheet dividing line is the dividing line between adjacent cells in a single column of cells, and the inter-string dividing line is the dividing line between adjacent cells in a single row of cells.

[0034] Preferably, in step 8, the inter-slice edge line region is subjected to Sobel processing, and a corresponding matrix is ​​obtained by vertical cumulative summing, and a histogram of the inter-slice region is obtained based on the matrix, and the edge line corresponding to the inter-slice edge line region is the maximum value of the inter-slice region histogram, which is the inter-slice edge line; the inter-string edge line region is subjected to Sobel processing, and a corresponding matrix is ​​obtained by horizontal cumulative summing, and a histogram of the inter-string region is obtained based on the matrix, and the edge line corresponding to the inter-string edge line region is the maximum value of the inter-string region histogram, which is the inter-string edge line.

[0035] Preferably, in step 4, P min <Pitch<P max The inter-chip spacing is qualified, and the inter-chip spacing is less than P min or greater than P max The sheet spacing is unqualified, 0.01mm≤P min ≤1mm, 3.5mm≤P max ≤5mm; C min <String spacing<C max The string spacing is qualified, and the string spacing is less than C min or greater than C max The string spacing is unqualified, 0.01mm≤C min ≤1mm, 3.5mm≤C max ≤5mm; W min <Displacement value<W max The misalignment value is qualified, and the misalignment value is less than W min or greater than W max The misalignment value is unqualified, 2mm≤W min <3mm, 3mm≤W max ≤4mm.

[0036] Preferably, in the photovoltaic module, each battery cell is adjacent to the other three battery cells and is distributed in a field shape, and the four battery cells form a cross-shaped gap; the four battery cells distributed in the field shape are respectively the upper left battery cell, the upper right battery cell, the lower left battery cell and the lower right battery cell, the edge line opposite to the upper left battery cell is recorded as bianyuanxian1, the edge line opposite to the upper right battery cell and the upper left battery cell is recorded as bianyuanxian2, the edge line opposite to the upper left battery cell and the lower left battery cell is recorded as bianyuanxian3, the edge line opposite to the lower left battery cell and the upper left battery cell is recorded as bianyuanxian4, and the edge line opposite to the upper right battery cell and the lower right battery cell is recorded as bi anyuanxian5, the edge line between the lower right battery cell and the upper right battery cell is recorded as bianyuanxian6, the edge line between the lower left battery cell and the lower right battery cell is recorded as bianyuanxian7, and the edge line between the lower right battery cell and the lower left battery cell is recorded as bianyuanxian8. The misalignment value of the four battery cells = maxN, N = (|bianyuanxian1-bianyuanxian7|, |bianyuanxian2-bianyuanxian8|, |bianyuanxian3-bianyuanxian5|, |bianyuanxian4-bianyuanxian6|).

[0037] The photovoltaic module defect detection method of the present invention can calculate the spacing between the cells in the image of the photovoltaic module through group cutting, arithmetic difference calculation, statistical summation, Sobel calculation and other algorithms, so as to determine whether the arrangement of the cells is accurate. It can quickly and accurately find the size defects of the photovoltaic module, so as to repair the corresponding products in the production line, thereby improving the qualified rate of photovoltaic module products. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a schematic diagram of a grayscale image grayImg of a photovoltaic module of the present invention;

[0039] Figure 2 is a schematic diagram of the image pc2Xw_qlist of the present invention;

[0040] Figure 3 is a schematic diagram of the image tr1Yh_qlist of the present invention;

[0041] Figure 4 is a schematic diagram of the image pc2Xw_qlist after binarization processing of the present invention;

[0042] Figure 5It is a schematic diagram of the image tr1Yh_qlist obtained by binarizing the present invention;

[0043] Figure 6 It is a schematic diagram of the histogram colHistogram of the present invention;

[0044] Figure 7 It is a schematic diagram of the histogram rowHistogram of the present invention;

[0045] Figure 8 It is a schematic diagram of the grayscale image grayImg of the photovoltaic module of the present invention, on which the column division lines cellX and the row division lines cellY are drawn;

[0046] Fig. 9 It is a schematic diagram of four battery cells distributed in a cross shape after cutting of the present invention, on which the column division lines cellX and their corresponding column reference lines, the row division lines cellY and their corresponding row reference lines are drawn, and the cross-shaped gap formed by the four battery cells is also shown;

[0047] Fig.10 It is a schematic diagram of four battery cells distributed in a cross shape after cutting of the present invention, on which the inter-cell division lines, column reference lines, inter-string division lines and row reference lines are drawn;

[0048] Fig.11 It is a schematic diagram of the histogram of region 1a of the present invention;

[0049] Fig.12 It is a schematic diagram of four battery cells distributed in a cross shape of the photovoltaic module of the present invention, on which the edge lines of each battery cell are drawn;

[0050] Fig.13A It is a schematic diagram of the grayscale image grayImg of the photovoltaic module of the present invention, which shows the starting point (X1, Y1);

[0051] Fig. 13B It is a schematic diagram of the grayscale image grayImg of the photovoltaic module of the present invention, which shows the coordinate points of each battery cell. Detailed implementation manners

[0052] The following, in combination with the attached Figure 1-13B The given embodiments are used to further illustrate the specific implementation manners of the method for detecting defects of the photovoltaic module of the present invention. The method for detecting defects of the photovoltaic module of the present invention is not limited to the descriptions of the following embodiments.

[0053] The method for detecting defects of the photovoltaic module of the present invention is characterized in that it includes the following steps:

[0054] Step 1, obtaining a photovoltaic module image of the photovoltaic module and graying it to obtain a grayscale image grayImg of the photovoltaic module; the grayscale image grayImg of the photovoltaic module has a width of grayImgWidth and a height of grayImgHeight, and the cells on the grayscale image grayImg of the photovoltaic module are distributed in cellColNum rows × cellRowNum columns;

[0055] According to the grayscale image grayImg of the photovoltaic module, calculate the total width of a single row of cells cellallwidt h and the total height of a single row of cells cellallheight; the total width of a single row of cells cellallwidt h is the sum of the width of all cells in the row and the total cell spacing, where the cell spacing is the spacing between adjacent cells in the same row; the total height of a single column of cells, cellallheight, is the sum of the height of all cells in the column and the total string spacing, where the string spacing is the spacing between adjacent cells in the same column;

[0056] Step 2: Calculate the edge lines of each cell according to the total width cellallwidth and the total height cellallheight obtained in step 1; the edge lines include inter-cell edge lines and inter-string edge lines, the inter-cell edge lines include two edge lines in the cell height direction, and the inter-string edge lines include two edge lines in the cell width direction;

[0057] Step 3, integrating the cell vertex coordinates of each cell according to the edge lines of each cell;

[0058] Step 4, based on the vertex lines of each battery cell, calculate the cell spacing, string spacing and misalignment value; if the cell spacing is within the cell spacing threshold range, it is qualified, and if it exceeds the cell spacing threshold range, it is unqualified; if the string spacing is within the string spacing threshold range, it is qualified, and if it exceeds the string spacing threshold range, it is unqualified; if the misalignment value is within the misalignment value threshold range, it is qualified, and if it exceeds the misalignment value threshold range, it is unqualified.

[0059] The photovoltaic module defect detection method of the present invention can calculate the spacing of the cells in the image of the photovoltaic module through group cutting, arithmetic difference calculation, statistical summation, Sobel calculation and other algorithms, so as to judge whether the arrangement of the cells is accurate. It can quickly and accurately find the size defects of the photovoltaic module, so as to repair the corresponding products in the production line, thereby improving the qualified rate of photovoltaic module products.

[0060] The following is an embodiment of a method for detecting defects of a photovoltaic module of the present invention. Specifically, the detection method of the present invention is preferably a method for detecting size defects of a photovoltaic module based on image edge detection.

[0061] The method for detecting defects of photovoltaic modules of the present invention comprises the following steps:

[0062] Step 1, obtaining a photovoltaic module image of the photovoltaic module and graying it to obtain a grayscale image grayImg of the photovoltaic module; the grayscale image grayImg of the photovoltaic module has a width of grayImgWidth and a height of grayImgHeight, and the cells on the grayscale image grayImg of the photovoltaic module are distributed in cellColNum rows × cellRowNum columns;

[0063] According to the grayscale image grayImg of the photovoltaic module, the total width cellallwidth of a single row of cells and the total height cellallheight of a single column of cells are calculated; the total width cellallwidth of a single row of cells is the sum of the widths of all cells in the row and the total spacing between cells, where the spacing between cells is the spacing between adjacent cells in the same row; the total height cellallheight of a single column of cells is the sum of the heights of all cells in the column and the total spacing between strings, where the spacing between strings is the spacing between adjacent cells in the same column.

[0064] Preferably, the step 1 further comprises the following sub-steps:

[0065] Step 1, obtain the photovoltaic module image of the photovoltaic module and grayscale it to obtain the grayscale image grayImg of the photovoltaic module; the grayscale image grayImg of the photovoltaic module has a width of grayImgWidth and a height of grayImgHeight, and the cells on the grayscale image grayImg of the photovoltaic module are distributed in cellRowNum rows × cellColNum columns.

[0066] Specifically, Figure 1 As shown, an embodiment of the grayscale image grayImg of the photovoltaic module includes 6×12 cells, that is, there are 6 rows (or rows) of cells and 12 columns of cells on the grayscale image grayImg of the photovoltaic module. Of course, the cells on the photovoltaic module can also be distributed in 6×10 or other arrays.

[0067] Step 2, divide the photovoltaic module grayscale image grayImg proportionally, take 1 / cellColNum in the height direction of the photovoltaic module grayscale image grayImg to obtain the image pc2Xw_qlist, and take 1 / cellRowNum in the width direction of the photovoltaic module grayscale image grayImg to obtain the image tr1Yh_qlist.

[0068] Specifically, Figure 2As shown, it is an example of the image pc2Xw_qlist; Figure 3 The figure shows an example of the image tr1Yh_qlist.

[0069] Preferably, in step 2, the image pc2Xw_qlist and the image tr1Yh_qlist are binarized respectively according to the following binarization method: the pixel values ​​less than 100 on the image are set to 0, and the pixel values ​​greater than 100 remain unchanged, which is conducive to speeding up the subsequent calculation steps.

[0070] Preferably, the image pc2Xw_qlist and the image tr1Yh_qlist are binarized according to Formula 1 and Formula 2 respectively:

[0071] Formula 1:

[0072] pc2Xw_qlist[pc2Xw_qlist<=100]=0;

[0073] Formula 2:

[0074] tr1Yh_qlist[tr1Yh_qlist<=100]=0.

[0075] Specifically, Figure 4 As shown in FIG. 1 , it is an example of the image pc2Xw_qlist after binarization processing; Figure 5 As shown, it is an example of the image tr1Yh_qlist after binarization processing.

[0076] Step 3: Calculate the edge line histogram colHistogram of a single column of cells and the edge line histogram rowHistogram of a single row of cells respectively according to the image pc2Xw_qlist and the image tr1Yh_qlist.

[0077] Preferably, the vertical pixel sum of the image pc2Xw_qlist after the binarization processing is calculated, and the horizontal pixel sum of the image tr1Yh_qlist after the binarization processing is calculated.

[0078] Specifically, for the image pc2Xw_qlist, the matrix colHistogram is obtained by vertical accumulation. This operation is set as operation opt1(pc2Xw_qlist). According to the matrix colHistogram, the following is drawn: Figure 6The histogram colHistogram shown in the figure; for the image tr1Yh_qlist, the matrix rowHistogram is obtained by horizontal accumulation. This operation is set as operation opt2(tr1Yh_qlist). According to the matrix rowHistogram, the following is drawn Figure 7 The histogram rowHistogram is shown.

[0079] Step 4: Calculate the total width cellallwidth of a single row of cells based on the edge line histogram colHistogram; calculate the total height cellallheight of a single column of cells based on the edge histogram rowHistogram.

[0080] Preferably, step 4 includes the following sub-steps:

[0081] Step 41, get X1 n , X1 n It is a one-dimensional array obtained by arithmetic subtraction after grouping the edge line histogram colHistogram into groups of n0 pixels. Each value in the one-dimensional array is the value obtained by arithmetic subtraction. According to X1 n Calculate the left edge line LeftEdge and the right edge line reghtEdge of the image pc2Xw_qlist of a single column of cells, 20≤n0≤100.

[0082] Step 42, get X2 n , X2 n It is a one-dimensional array obtained by arithmetic subtraction after grouping the edge line histogram rowHistogram into n0 pixels. Each value in the one-dimensional array is the value obtained by arithmetic subtraction. According to X2 n Calculate the upper edge line topEdge and the lower edge line bottomEdge of the image tr1Yh_qlist of a single row of cells.

[0083] Step 43, based on the left edge line LeftEdge and the right edge line reghtEdge of the single-column battery cell image pc2Xw_qlist, calculate the total width cellallwidth of cellColNum battery cells and all the cell spacings in the single-column battery cell image pc2Xw_qlist; based on the upper edge line topEdge and the lower edge line bottomEdge of the single-row battery cell image tr1Yh_qlist, calculate the total height cellallheight of cellRowNum battery cells and all the string spacings in the single-row battery cell image tr1Yh_qlist.

[0084] The following is a specific example of step 4:

[0085] Step 41, calculate the left edge line LeftEdge and the right edge line reghtEdge of the image pc2Xw_qlist, and the specific calculation process is as follows:

[0086] Taking n0 pixels as a group, the edge line histograms of single-column cells and single-row cells are grouped respectively, and then arithmetic difference is subtracted. The calculation formula is as follows:

[0087] Formula 31:

[0088] nlnteral=20;

[0089] Formula 32:

[0090] coIs_minInterval=grayImgWidth / / cellColNum;

[0091] Formula 33:

[0092] rows_minInterval=grayImgHeight / / cellRowNum;

[0093] Formula 34:

[0094]

[0095] in,

[0096] 20≤n0≤100, n0 is preferably 20, 40 or 60;

[0097] cols_minInterval is the width of the battery cell;

[0098] rows_minInterval, is the height of the battery cell;

[0099] ColHistogram(i-nInteral:i), is Figure 7 All numbers from the i-th position to the i-th position of the edge line histogram of the single row of cells shown;

[0100] ColHistogram(i:i+nInteral), is Figure 7 All numbers at the i-th to i+n-th Interal positions of the edge line histogram of the single row of cells shown;

[0101] X1 n , for the Figure 7The edge line histogram ColHistogram of the single row of cells shown is grouped and then arithmetic difference subtraction is performed to obtain a one-dimensional array, wherein each value in the one-dimensional array is a value obtained by arithmetic difference subtraction.

[0102] The calculation formula of the left edge line LeftEdge of the image pc2Xw_qlist is as follows:

[0103] Formula 41:

[0104] LeftEdge=maxX1 n ;

[0105] Formula 42:

[0106] n=(nInteraI, nInteral+1, nInteral+2...cols_minInterval-nInteral).

[0107] Among them, leftEdge is to bring each value of n into the aforementioned X1 n A one-dimensional array is obtained from the calculation formula and the maximum value of the one-dimensional array is taken.

[0108] The calculation formula of the right edge line reghtEdge of the image pc2Xw_qlist is as follows:

[0109] Formula 51:

[0110] reghtEdge=maxX1 n ;

[0111] Formula 52:

[0112] Startn=grayImgWidth-cols_minInterval+nInteral;

[0113] Formula 53:

[0114] Endn=grayImgWidth-nInteral;

[0115] Formula 54:

[0116] n=(startn, startn+1, startn+2...endn);

[0117] in,

[0118] Startn is the first value of n, starting from the right (the rightmost side of the entire PV module);

[0119] Endn is the last value of n, which prevents the value of n from exceeding the image width during the calculation process;

[0120] ReghtEdge is the right edge line. The value is taken from the right side, which is the image width minus the battery cell width plus the aforementioned nInteral.

[0121] Step 42, calculating the upper edge line topEdge and the lower edge line bottomEdge of the image tr1Yh_qlist, the specific calculation process is as follows:

[0122] The calculation formula of the upper edge line topEdge is as follows:

[0123] Formula 61:

[0124]

[0125] Formula 62:

[0126] topEdge=maxX2 n ;

[0127] Formula 63:

[0128] n=(nInteral, nInteral+1, nInteral+2...rows_minInterval-nInteral);

[0129] in,

[0130] X2 n , for the Figure 7 After the edge line histogram rowHistogram of a single row of cells is grouped, a one-dimensional array is obtained by arithmetic difference subtraction, and each value in the one-dimensional array is a value obtained by arithmetic difference subtraction;

[0131] rowHistogram(i-nInteral:i), is Figure 7 All numbers from the i-th position to the i-th position of the edge line histogram of the single row of cells shown;

[0132] rowHistogram(i:i+nInteral), is Figure 7 All numbers from the i-th to the i+n-th Interal positions of the edge line histogram of a single row of cells are shown.

[0133] Formula 62 is a one-dimensional array obtained by substituting each value of n into Formula 61, and taking the maximum value of the one-dimensional array, that is, the upper edge line topEdge.

[0134] The calculation formula of the bottom edge line bottomEdge is as follows:

[0135] Formula 71:

[0136] bottomEdge=maxX2 n ;

[0137] Formula 72:

[0138] startn=grayImgHeight-rows_minInterval+nInteral;

[0139] Formula 73:

[0140] endn=grayImgHeight–nInteral;

[0141] Formula 74:

[0142] n=(startn, startn+1, startn+2, .....endn);

[0143] in,

[0144] startn, the first value of n;

[0145] endn, the last value of n;

[0146] Formula 71 substitutes each value of n into Formula 61 to obtain a one-dimensional array, and takes the maximum value of the one-dimensional array, that is, the bottom edge line bottomEndge.

[0147] Step 43, calculate the total width cellallwidth and the total height cellallheight:

[0148] refer to Figure 4 As shown, the calculation formula for the total width cellallwidth of cellColNum cells and all cell spacing in the image pc2Xw_qlist of a single row of cells is as follows:

[0149] Formula 81:

[0150] cellallwidth=rightEdge-leftEdge;

[0151] refer to Figure 5 As shown, the calculation formula for the total height cellallheight of cellRowNum cells and all string spacings in the single-row cell image tr1Yh_qlist is as follows:

[0152] Formula 91:

[0153] cellallheight=bottomEdge-topEdge.

[0154] Step 2: Calculate the edge lines of each cell based on the total width cellallwidth and the total height cellallheight obtained in step 1; the edge lines include inter-cell edge lines and inter-string edge lines, the inter-cell edge lines include two edge lines in the cell height direction, and the inter-string edge lines include two edge lines in the cell width direction.

[0155] It should be pointed out that Fig.12 As shown, each of the battery cells includes two inter-cell edge lines and two inter-string edge lines, each inter-cell edge line extends along the height direction of the battery cell and the two inter-cell edge lines are located at both ends of the width direction of the battery cell, each inter-string edge line extends along the width direction of the battery cell and the two inter-string edge lines are located at both ends of the height direction of the battery cell.

[0156] Preferably, step 2 further includes the following sub-steps:

[0157] Step 5, according to the total width cellallwidth and the total height cellallheight, respectively calculate the width cellwidth and height cellheight of the battery cell; according to the width cellwidth of the battery cell and the edge line histogram rowHistogram, obtain the column dividing line cellX, each column of battery cells has a column dividing line cellX on both sides, and there is a column dividing line cellX between two adjacent columns of battery cells; according to the height cellheight of the battery cell and the edge line histogram colHistogram, obtain the row dividing line cellY, each row of battery cells has a row dividing line cellY on both sides, and there is a row dividing line cellY between two adjacent rows of battery cells.

[0158] Preferably, step 5 includes the following sub-steps:

[0159] Step 51, calculate the width cellwidth and height cellheight of the battery cell, the calculation process is as follows:

[0160] Formula 101:

[0161] cellallwidth / cellColNum=cellwidth;

[0162] Formula 102:

[0163] Cellallheight / cellRowNum=cellheight;

[0164] Step 52, calculate the X coordinate cellX of each column dividing line cellX according to the cell width cellwidth and the edge line histogram rowHistogram n ; Calculate the Y coordinate cellY of each row dividing line cellY based on the cell height cellheight and the edge line histogram colHistogram n , the calculation process is as follows:

[0165] The calculation process of the X coordinate of the column dividing line cellX is as follows:

[0166] Formula 103:

[0167] cellX1 = leftEdge;

[0168] Formula 104:

[0169] cellX n =max[rowHistogram(tmp-A:tmp+A)]+tmp-A;

[0170] Formula 105:

[0171] tmp=cellX n-1 +cellwidth;

[0172] Formula 106:

[0173] n=(0, 1, 2, 3, 4..., cellColNum-2).

[0174] The calculation process of the Y coordinate of the row dividing line cellY is as follows:

[0175] Formula 107:

[0176] cellY1 = topEdge;

[0177] Formula 108:

[0178] cellY n =cellY n-1 +cellheight;

[0179] Formula 109:

[0180] n=(0, 1, 2, 3, 4..., cellRowNum-2).

[0181] in,

[0182] Formula 104 is to take Figure 7The maximum value from the tmp-Ath to the tmp+Ath position in the edge line histogram rowHistogram of a single row of cells shown, where A is an integer.

[0183] Step 53: convert the X coordinate cellX obtained in step 52 n and the Y coordinate cellY n Plotted on the grayscale image grayImg of the photovoltaic module, we get Figure 8 (Grayscale image grayImg of a photovoltaic module with dividing lines), the horizontal dotted line represents the column dividing line cellX, and the vertical dotted line represents the row dividing line cellY.

[0184] Step 6, based on the column dividing line cellX and the row dividing line xellY, determine the column reference line coordinated with each column dividing line cellX and the row reference line coordinated with each row dividing line cellY; based on the column dividing line cellX, the column reference line, the row dividing line cellY and the row reference line, determine the inter-sheet dividing line and the inter-string dividing line, the inter-sheet dividing line is the dividing line between adjacent battery cells in the same single column of battery cells, and the inter-string dividing line is the dividing line between adjacent battery cells in the same single row of battery cells.

[0185] Preferably, step 6 includes the following sub-steps:

[0186] Step 61, based on each of the column dividing lines cellX and the width of the battery cell, calculate two groups of column reference lines corresponding to the column dividing line cellX, each group of column reference lines includes two column reference lines located on both sides of the column dividing line cellX; based on each of the row dividing lines cellY and the height of the battery cell, calculate two groups of row reference lines corresponding to the row dividing line cellY, each group of row reference lines includes two row reference lines located on both sides of the row dividing line cellY.

[0187] Preferably, the two groups of column reference lines corresponding to each of the column dividing lines cellX are respectively a first group of column reference lines and a second group of column reference lines, the two column reference lines of the first group of column reference lines are respectively located on both sides of the column dividing line cellX, and the two column reference lines of the second group of column reference lines are respectively located on both sides of the first group of column reference lines; the two groups of row reference lines corresponding to each of the inter-row reference lines and row dividing lines cellY are respectively a first group of row reference lines and a second group of row reference lines, the two row reference lines of the first group of row reference lines are respectively located on both sides of the row dividing line cellY, and the two row reference lines of the second group of row reference lines are respectively located on both sides of the first group of row reference lines; the column reference lines are parallel to the column dividing lines cellX, and the row reference lines are parallel to the row dividing lines cellY.

[0188] Step 62 , determining the inter-slice dividing line area and the inter-string dividing line area respectively according to each column dividing line cellX, the column reference line, each row dividing line cellY and the row reference line.

[0189] Step 63, according to the inter-sheet dividing line area and the inter-string dividing line area, respectively calculate the inter-sheet dividing line and the inter-string dividing line, the inter-sheet dividing line is the dividing line between adjacent cells in a single column of cells, and the inter-string dividing line is the dividing line between adjacent cells in a single row of cells.

[0190] Step 7, based on the inter-chip dividing lines and inter-string dividing lines obtained in step 6, as well as the column reference lines and row reference lines, determine the edge line area used to calculate the edge line of the battery cell, the edge line area corresponds one-to-one to the edge line of the battery cell, and the edge line area includes the inter-chip edge line area and the inter-string edge line area.

[0191] Step 8: Calculate the edge lines of the battery cell corresponding to each edge line area according to the edge line area obtained in step 7.

[0192] Preferably, in step 8, the inter-slice edge line region is subjected to Sobel processing, and a corresponding matrix is ​​obtained by vertical cumulative sum (that is, operation Opt1 is performed on the inter-slice edge line region to obtain the corresponding matrix), and an inter-slice region histogram is obtained based on the matrix, and the edge line corresponding to the inter-slice edge line region is the maximum value of the inter-slice region histogram, which is the inter-slice edge line; the inter-string edge line region is subjected to Sobel processing, and a corresponding matrix is ​​obtained by horizontal cumulative sum (that is, operation Opt2 is performed on the inter-string edge line region to obtain the corresponding matrix), and an inter-string region histogram is obtained based on the matrix, and the edge line corresponding to the inter-string edge line region is the maximum value of the inter-string region histogram, which is the inter-string edge line.

[0193] Specifically, the following is a calculation example of step 2:

[0194] The X coordinate cellXn and the Y coordinate cellYn obtained in step 5 are further processed, cellXn includes cellColNum+1 values, and cellYn includes cellRowBum+1 values.

[0195] Specifically, the following will select a set of column dividing lines and row dividing lines (the coordinates of the column dividing line and the row dividing line are cellX1 and cellY5 respectively, cellX1 is cellX n The second value of cellY, cellY5 is cellY n Taking the sixth value of ) as an example, the edge line calculation process of the battery cell is described as follows:

[0196] Calculate two sets of row guides corresponding to cellX1 and two sets of column guides corresponding to cellY5:

[0197] Formula 111:

[0198] X1=cellX1-(cellwidth / / a1);

[0199] cellwidth / / 3≤cellwidth / / a1≤cellwidth / / 2, cellwidth / / a1 is preferably cellwidth / / 2;

[0200] Formula 112:

[0201] X2=cellX1+(cellwidth / / a1);

[0202] Formula 113:

[0203] X3=cellX1-(cellwidth / / a2);

[0204] cellwidth / / 6≤cellwidth / / a2≤cellwidth / / 2, cellwidth / / a1 is preferably cellwidth / / 6, cellwidth / / a2<cellwidth / / a1;

[0205] Formula 114:

[0206] X4=cellX1+(cellwidth / / a2);

[0207] Formula 115:

[0208] Y1=cellY5-(cellheight / / a1);

[0209] Formula 116:

[0210] Y2=cellY5+(cellheight / / a1);

[0211] Formula 117:

[0212] Y3=cellY5-(cellheight / / a3);

[0213] cellwidth / / 20≤cellwidth / / a3≤cellwidth / / 10, cellwidth / / a3 is preferably cellwidth / / 20;

[0214] Formula 118:

[0215] Y4=cellY5+(cellheight / / a3);

[0216] in,

[0217] / / , is an operation symbol, meaning: "round down after division";

[0218] X1 is cellX1 minus 1 / a1 of the width of a single cell. This reduces the amount of calculation and Fig. 9 The left side of the horizontal white part of the cross-shaped gap between the cells is wrapped in;

[0219] X2 is cellX1 plus 1 / a1 of the width of a single cell. This reduces the amount of calculation and Fig. 9 The right side of the horizontal white part of the cross-shaped gap between the cells is wrapped in;

[0220] X3, take a smaller part from X1 to cellX1 to further reduce the amount of calculation;

[0221] X4, take a smaller part from cellX1 to X2 to further reduce the amount of calculation;

[0222] Y1 is cellY5 minus 1 / a1 of the height of a single cell. This reduces the amount of calculation and Fig. 9 The upper edge of the vertical white portion of the cross-shaped gap between the cells is wrapped in;

[0223] Y2 is cellY5 plus 1 / a1 of the height of a single cell. This reduces the amount of calculation and Fig. 9 The lower edge of the vertical white portion of the cross-shaped gap between the cells is wrapped in;

[0224] Y3, take a smaller part from Y3 to cellY5 to further reduce the amount of calculation;

[0225] Y4, take a smaller part from cellY5 to Y4 to further reduce the amount of calculation.

[0226] According to the column dividing line cellX1, the column reference lines (X1, X2, X3, X4), the row dividing line cellY5 and the row reference lines (Y1, Y2, Y3, Y4), the inter-slice dividing line area and the inter-string dividing line area are determined as follows:

[0227] Formula 121:

[0228] Area 1 = grayImg [Y1: cellY5, X3: X4];

[0229] Formula 122:

[0230] Area 2 = grayImg [Y3: Y4, X1: cellX1];

[0231] Formula 123:

[0232] Area 3 = grayImg [Y3: Y4, cellX1: X2];

[0233] Formula 124:

[0234] area4 = grayImg[cellY5:Y2,X3:X4];

[0235] in,

[0236] Area 1 is the area enclosed by Y1 to cellY5 in the horizontal direction and X3 to X4 in the vertical direction, which is the area of ​​the dividing line between the slices;

[0237] Area 2 is the area enclosed by Y3 to Y4 in the horizontal direction and X1 to cellX1 in the vertical direction, which is the dividing line area between strings;

[0238] Area 3 is the area enclosed by cells Y3 to Y4 in the horizontal direction and cells X1 to X2 in the vertical direction, and is the dividing line area between strings;

[0239] Area 4 is the area enclosed by cellY5 to Y2 in the horizontal direction and X3 to X4 in the vertical direction, and is the area of ​​the dividing line between the slices.

[0240] According to the inter-slice dividing line area and the inter-string dividing line area, the inter-slice dividing line and the inter-string dividing line are calculated respectively, as follows:

[0241] Formula 131:

[0242] Xtop = Max(opt1(region1));

[0243] Formula 132:

[0244] Yleft = Max(opt2(region2));

[0245] Formula 133:

[0246] XBOTTOM = Max(opt1(area4));

[0247] Formula 134:

[0248] Yright = Max(opt2(area3));

[0249] in,

[0250] Xtop, obtained by performing opt1 operation on region 1 and taking the maximum value, is the inter-slice dividing line;

[0251] Yleft, obtained by performing opt2 operation on region 2 and taking the maximum value, is the dividing line between strings;

[0252] XBOTTOM, obtained by performing opt1 operation on region 4 and taking the maximum value, is the dividing line between slices;

[0253] Yright, obtained by performing opt2 operation on region 3 and taking the maximum value, is the dividing line between strings.

[0254] Specifically, Fig. 9 As shown, it is an example of the inter-slice dividing lines Xtop and XBOTTOM, and the inter-string dividing lines Yleft and Yright.

[0255] Based on the column reference lines (X1, X2, X3, X4), the row reference lines (Y1, Y2, Y3, Y4), the inter-chip dividing lines (Xtop, XBOTTOM), and the inter-string dividing lines (Yleft, Yright), 8 edge line regions for obtaining the edge lines of the battery cells are determined. The edge line regions include the inter-chip edge line regions and the inter-string edge line regions, as follows:

[0256] Preferably, the eight edge line regions are calculated according to the following formula:

[0257] Formula 141:

[0258] area1a = grayImg[Y1:Yleft, X3:Xtop];

[0259] Formula 142:

[0260] region1b = grayImg[Y1:Yright,Xtop:X4];

[0261] Formula 143:

[0262] Area 3a=grayImg[Y3:Yright,Xtop:X2];

[0263] Formula 144:

[0264] Area 3b = grayImg [Yright: Y4, XBOTTOM: X2];

[0265] Formula 145:

[0266] Area 2a = grayImg [Tleft: Y2, X3: XBOTTOM];

[0267] Formula 146:

[0268] Area 2b = grayImg [Yright: Y2, XBOTTOM: X4];

[0269] Formula 147:

[0270] region4a = grayImg[Y3:Yleft, X1:Xtop];

[0271] Formula 148:

[0272] region4b = grayImg[Yleft:Y4,X1:XBOTTOM];

[0273] in,

[0274] Area 1a is the area enclosed by Y1 to Yleft in the horizontal direction and X3 to Xtop in the vertical direction, which is the edge line area between sheets;

[0275] Area 1b is the area enclosed by Y1 to Yright in the horizontal direction and Xtop to X4 in the vertical direction, which is the edge line area between sheets;

[0276] Area 3a is the area enclosed by Y3 to Yright in the horizontal direction and Xtop to X2 in the vertical direction, and is the edge line area between strings;

[0277] Area 3b is the area enclosed by Yright to Y4 in the horizontal direction and XBOTTOM to X2 in the vertical direction, which is the edge line area between strings;

[0278] Area 2a is the area enclosed by Yleft to Y2 in the horizontal direction and X3 to XBOTTOM in the vertical direction, which is the edge line area between slices;

[0279] Area 2b is the area enclosed by Yright to Y2 in the horizontal direction and XBOTTOM to X4 in the vertical direction, which is the edge line area between sheets;

[0280] Area 4a is the area enclosed by Y3 to Yleft in the horizontal direction and X1 to Xtop in the vertical direction, and is the edge line area between sheets;

[0281] Region 4b is an area enclosed by Yleft to Y4 in the horizontal direction and X1 to XBOTTOM in the vertical direction, and is an inter-chip edge line area.

[0282] Specifically, Fig.10 The shown one example of the area 1-8.

[0283] Specifically, the process of obtaining the edge line is described below by taking region 1a as an example:

[0284] (1) Perform Sobel processing on region 1a to obtain the edge line map after Sobel processing;

[0285] (2) Perform operation opt1 on the edge line image after Sobel; obtain the corresponding histogram, recorded as the area 1a histogram (such as Fig.11shown);

[0286] (3) The maximum value of the histogram of region 1a is obtained according to the following formula, that is, the edge line corresponding to region 1a, which is recorded as the edge line of region 1a: edge line of region 1a = max(opt1(sobel(region 1a))).

[0287] Similarly, the edge lines of regions 1b, 4a, and 4b can be obtained according to the above process.

[0288] Specifically, taking region 2a as an example, the process of obtaining the edge line is described as follows:

[0289] (1) Perform Sobel on region 2a to obtain the edge line map after Sobel;

[0290] (2) Perform operation opt2 on the edge line graph after sobe1 to obtain the corresponding histogram;

[0291] (3) The maximum value of the histogram of region 2a is obtained according to the following formula, that is, the edge line corresponding to region 2a, which is recorded as the edge line of region 1b: edge line of region 2a = max(opt2(sobel(region 2a))).

[0292] Similarly, the edge lines of regions 2b, 3a, and 3b can be obtained according to the above process.

[0293] like Fig.12 As shown in the figure, the dotted lines represent eight edge lines obtained according to the above method.

[0294] The edge lines of all battery cells can be obtained in the same way.

[0295] It should be noted that each edge line corresponds to a corresponding X coordinate or Y coordinate (the edge line between slices is represented by the X coordinate, that is, each edge line between slices is also an X coordinate; the edge line between strings is represented by the Y coordinate, that is, each edge line between strings is also a Y coordinate). Fig.12 As shown, bianyuanxian1-bianyuanxian8 represent 8 specific values. Fig.12 In order to more clearly describe the position of the edge line, it is described in the form of a line. For example, after obtaining the value of bianyuanxian1, a line perpendicular to Fig. 9 The Y1 dividing line in Fig.12 After obtaining the value of bianyaunxian3, make a vertical Fig. 9 The X1 dividing line in the middle obtains Fig.12 bianyaunxian3 is displayed in the middle; similarly, get Fig.12 The other edge lines in ; therefore, Fig.12 Among them, bianyuanxian1, bianyuanxian7, bianyuanxian2, and bianyuanxian8 are X coordinates, and bianyuanxian3, bianyuanxian4, bianyuanxian5, and bianyuanxian6 are Y coordinates.

[0296] Step 3: store the vertex coordinates of each battery cell according to the edge line of each battery cell obtained in step 2. Further, store the vertex coordinates of each battery cell in the form of an array.

[0297] Preferably, the vertices of the battery cells adjacent to the intersection of the column dividing line and the row dividing line are grouped together, and the vertex coordinates of the battery cells are stored in the form of an array. Fig. 9 , 10 , 11 and 13B, the following is an example of the vertex coordinate array of the battery cell, the intersection of the column dividing line X1 and the row dividing line Y5 is [zuobiaoX1, zuobiaoY5], including the vertices of the four battery cells adjacent thereto: then [zuobiaoX1, zuobiaoY5] = [(bianyuanxian1, bianyuanxian3), (bianyuanxian7, bianyuanxian4), (bianyuanxian2, bianyuanxian5), (bianyuanxian8, bianyuanxian6)]. It should be pointed out that the storage method of the vertex coordinates of the battery cell can be set according to actual needs, which is an artificially specified storage method. Different storage methods will result in different subsequent data retrieval methods. The present invention preferably adopts the above method to store the vertex coordinates of each battery cell.

[0298] Preferably, the coordinates of each cell are stored according to the following method: according to the horizontal edge line and the vertical edge line of the cell, the position of each cell relative to the starting point, that is, the vertex coordinates of each cell, is obtained. Further, the vertex coordinates of all cells can be expressed as [(zuobiaoX1, zuobiaoY1), (zuobiaoX2, zuobiaoY2) ... (zuobiaoXn, zuobiaoYn)].

[0299] It should be noted that the coordinates of each vertex of the battery cell are also the coordinates of the intersection of an inter-cell edge line and an inter-string edge line.

[0300] Specifically, Fig.13A and 13B As shown in the figure, the black dots on the figure are examples of the coordinates of each battery cell. Figure 1The coordinates (zuobiaoX1, zuobiaoY1) of the upper left corner of the battery cell in the upper left corner are the starting point (the starting point is preset), and the coordinates of the other battery cells are the positions relative to the starting point.

[0301] Step 4, based on the vertex coordinates of each battery cell, calculate the cell spacing, string spacing and misalignment value; if the cell spacing is within the cell spacing threshold range, it is qualified, and if it exceeds the cell spacing threshold range, it is unqualified; if the string spacing is within the string spacing threshold range, it is qualified, and if it exceeds the string spacing threshold range, it is unqualified; if the misalignment value is within the misalignment value threshold range, it is qualified, and if it exceeds the misalignment value threshold range, it is unqualified.

[0302] Preferably, in step 4, P min <Pitch<P max The inter-chip spacing is qualified, and the inter-chip spacing is less than P min or greater than P max The sheet spacing is unqualified, 0.01mm≤P min ≤1mm, 3.5mm≤P max ≤5mm; C min <String spacing<C max The string spacing is qualified, and the string spacing is less than C min or greater than C max The string spacing is unqualified, 0.01mm≤C min ≤1mm, 3.5mm≤C max ≤5mm; W min <Displacement value<W max The misalignment value is qualified, and the misalignment value is less than W min or greater than W max The misalignment value is unqualified, 2mm≤W min <3mm,3mm≤W max ≤4mm.

[0303] Preferably, Fig.12As shown, in the photovoltaic module, each battery cell is adjacent to the other three battery cells and is distributed in a field shape, and the four battery cells form a cross-shaped gap; the four battery cells distributed in the field shape are respectively the upper left battery cell, the upper right battery cell, the lower left battery cell and the lower right battery cell, the edge line opposite to the upper left battery cell is recorded as bianyuanxian1, the edge line opposite to the upper right battery cell is recorded as bianyuanxian2, the edge line opposite to the upper left battery cell is recorded as bianyuanxian3, the edge line opposite to the lower left battery cell is recorded as bianyuanxian4, the edge line opposite to the upper right battery cell is recorded as bianyuanxian5, and the edge line opposite to the lower right battery cell is recorded as bianyuanxian6. The edge line of the opposite battery cell is recorded as bianyuanxian6, the edge line opposite to the lower left battery cell is recorded as bianyuanxian7, and the edge line opposite to the lower right battery cell is recorded as bianyuanxian8. The misalignment value of the four battery cells = maxN, N = (|bianyuanxian1-bianyuanxian7|, |bianyuanxian2-bianyuanxian8|, |bianyuanxian3-bianyuanxian5|, |bianyuanxian4-bianyuanxian6|); among them, maxN is the maximum value in the data set N, and each data in the data set N represents the distance between two edge lines.

[0304] Specifically, Fig.12 As shown, the upper left battery cell and the lower left battery cell are two battery cells adjacent to each other in the same column, the upper right battery cell and the lower right battery cell are two battery cells adjacent to each other in the same column, the upper left battery cell and the upper right battery cell are two battery cells adjacent to each other in the same row, and the lower left battery cell and the lower right battery cell are two battery cells adjacent to each other in the same row. It should be noted that Fig.12 The complete upper left battery cell, upper right battery cell, lower left battery cell and lower right battery cell are not shown.

[0305] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A method for detecting defects in photovoltaic modules, characterized in that: It includes the following steps: Step 1, obtaining a photovoltaic module image of the photovoltaic module and graying it to obtain a grayscale image grayImg of the photovoltaic module; the grayscale image grayImg of the photovoltaic module has a width of grayImgWidth and a height of grayImgHeight, and the cells on the grayscale image grayImg of the photovoltaic module are distributed in cellColNum rows × cellRowNum columns; According to the grayscale image grayImg of the photovoltaic module, the total width cellallwidth of a single row of cells and the total height cellallheight of a single column of cells are calculated; the total width cellallwidth of a single row of cells is the sum of the widths of all cells in the row and the total inter-cell spacing, where the inter-cell spacing is the spacing between adjacent cells in the same row of cells; the total height cellallheight of a single column of cells is the sum of the heights of all cells in the column and the total string spacing, where the string spacing is the spacing between adjacent cells in the same column of cells; Step 2: Calculate the edge lines of each cell according to the total width cellallwidth and the total height cellallheight obtained in step 1; the edge lines include inter-cell edge lines and inter-string edge lines, the inter-cell edge lines include two edge lines in the cell height direction, and the inter-string edge lines include two edge lines in the cell width direction; Step 3, storing the vertex coordinates of each battery cell according to the edge line of each battery cell; Step 4: Calculate the cell spacing, string spacing and misalignment value based on the vertex coordinates of each cell; If the inter-slice spacing is within the inter-slice spacing threshold range, it is qualified; if the inter-slice spacing exceeds the inter-slice spacing threshold range, it is unqualified; if the string spacing is within the string spacing threshold range, it is qualified; if the string spacing exceeds the string spacing threshold range, it is unqualified; if the misalignment value is within the misalignment value threshold range, it is qualified; if the misalignment value exceeds the misalignment value threshold range, it is unqualified.

2. The method for detecting defects of photovoltaic modules according to claim 1, characterized in that: The step 1 includes the following sub-steps: Step 1, obtaining a photovoltaic module image of a photovoltaic module and graying it to obtain a photovoltaic module grayscale image grayImg; Step 2, divide the photovoltaic module grayscale image grayImg in proportion, take 1 / cellColNum in the height direction of the photovoltaic module grayscale image grayImg to obtain the image pc2Xw_qlist, and take 1 / cellRowNum in the width direction of the photovoltaic module grayscale image grayImg to obtain the image tr1Yh_qlist; Step 3, according to the image pc2Xw_qlist and the image tr1Yh_qlist, obtain the edge line histogram colHistogram and the edge line histogram rowHistogram respectively; Step 4: Calculate the total width cellallwidth of a single row of cells based on the edge line histogram colHistogram; calculate the total height cellallheight of a single column of cells based on the power line histogram rowHistogram.

3. The method for detecting defects of photovoltaic modules according to claim 2, characterized in that: In step 3, for the image pc2Xw_qlist, the matrix colHistogram is obtained by vertical cumulative summing, and the edge line histogram colHistogram is drawn based on the matrix colHistogram; for the image tr1Yh_qlist, the matrix rowHistogram is obtained by horizontal cumulative summing, and the edge line histogram rowHistogram is drawn based on the matrix rowHistogram.

4. The method for detecting defects of photovoltaic modules according to claim 2, characterized in that: The step 4 also includes the following sub-steps: Step 41, get X1 n , X1 n It is a one-dimensional array obtained by arithmetic subtraction after grouping the edge line histogram colHistogram into groups of n0 pixels. Each value in the one-dimensional array is the value obtained by arithmetic subtraction. According to X1 n Calculate the left edge line LeftEdge and the right edge line reghtEdge of the image pc2Xw_qlist of a single row of cells; 20≤n0≤100; Step 42, get X2 n , X2 n It is a one-dimensional array obtained by arithmetic subtraction after grouping the edge line histogram rowHistogram into n0 pixels. Each value in the one-dimensional array is the value obtained by arithmetic subtraction. According to X2 n Calculate the upper edge line topEdge and the lower edge line bottomEdge of the image tr1Yh_qlist of a single row of cells; Step 43, calculate the total width cellallwidth according to the left edge line LeftEdge and the right edge line reghtEdge of the image pc2Xw_qlist; calculate the total height cellallheight according to the top edge line topEdge and the bottom edge line bottomEdge of the image tr1Yh_qlist.

5. The method for detecting defects of photovoltaic modules according to claim 2, characterized in that: The step 2 includes the following sub-steps: Step 5, according to the total width cellallwidth and the total height cellallheight, respectively calculate the width cellwidth and height cellheight of the battery cell; according to the width cellwidth of the battery cell and the edge line histogram rowHistogram, obtain the column dividing line cellX, each column of battery cells has a column dividing line cellX on both sides, and there is a column dividing line cellX between two adjacent columns of battery cells; according to the height cellheight of the battery cell and the edge line histogram colHistogram, obtain the row dividing line cellY, each row of battery cells has a row dividing line cellY on both sides, and there is a row dividing line cellY between two adjacent rows of battery cells; Step 6, according to the column dividing line cellX and the row dividing line cellY, determine the column reference line coordinated with each column dividing line cellX and the row reference line coordinated with each row dividing line cellY; according to the column dividing line cellX, the column reference line, the row dividing line cellY and the row reference line, determine the inter-sheet dividing line and the inter-string dividing line, the inter-sheet dividing line is the dividing line between adjacent battery cells in the same single column of battery cells, and the inter-string dividing line is the dividing line between adjacent battery cells in the same single row of battery cells; Step 7, determining an edge line region for calculating the edge line of the battery cell according to the inter-chip dividing lines and the inter-string dividing lines, as well as the column reference lines and the row reference lines, wherein the edge line region corresponds to the edge line of the battery cell one-to-one, and the edge line region includes an inter-chip edge line region and an inter-string edge line region; Step 8: Calculate the edge line corresponding to each edge line region based on the edge line region.

6. The method for detecting defects of photovoltaic modules according to claim 5, characterized in that: The step 5 comprises the following sub-steps: Step 51, calculating the width cellwidth and the height cellheight of the cell according to the total width cellallwidth and the total height cellallheight; Step 52, calculate the X coordinate cellX of each column dividing line cellX according to the cell width cellwidth and the edge line histogram rowHistogram n ; Calculate the Y coordinate cellY of each row dividing line cellY based on the cell height cellheight and the edge line histogram colHistogram n ; Step 53: set the X coordinate cellX obtained in step 52 n and the Y coordinate cellY n , respectively draw the grayscale image grayImg of the photovoltaic module to obtain the column dividing line cellX and the row dividing line cellY.

7. The method for detecting defects of photovoltaic modules according to claim 5, characterized in that: The step 6 comprises the following sub-steps: Step 61, according to each of the column dividing lines cellX and the width of the battery cell, two groups of column reference lines corresponding to the column dividing line cellX are calculated, and each group of column reference lines includes two column reference lines located on both sides of the column dividing line cellX; according to each of the row dividing lines cellY and the height of the battery cell, two groups of row reference lines corresponding to the row dividing line cellY are calculated, and each group of row reference lines includes two row reference lines located on both sides of the row dividing line cellY; Step 62, determining the inter-slice dividing line area and the inter-string dividing line area respectively according to the column dividing line cellX, the column reference line, the row dividing line cellY and the row reference line; Step 63, according to the inter-sheet dividing line area and the inter-string dividing line area, respectively calculate the inter-sheet dividing line and the inter-string dividing line, the inter-sheet dividing line is the dividing line between adjacent cells in a single column of cells, and the inter-string dividing line is the dividing line between adjacent cells in a single row of cells.

8. The method for detecting defects of photovoltaic modules according to claim 5, characterized in that: In step 8, the inter-slice edge line region is subjected to Sobel processing, and a corresponding matrix is ​​obtained by vertical cumulative summing, and a histogram of the inter-slice region is obtained based on the matrix. The edge line corresponding to the inter-slice edge line region is the maximum value of the inter-slice region histogram, which is the inter-slice edge line; the inter-string edge line region is subjected to Sobel processing, and a corresponding matrix is ​​obtained by horizontal cumulative summing, and a histogram of the inter-string region is obtained based on the matrix. The edge line corresponding to the inter-string edge line region is the maximum value of the inter-string region histogram, which is the inter-string edge line.

9. The method for detecting defects of photovoltaic modules according to claim 1, characterized in that: In step 4, P min <Pitch<P max The inter-chip spacing is qualified, and the inter-chip spacing is less than P min or greater than P max The sheet spacing is unqualified, 0.01mm≤P min ≤1mm, 3.5mm≤P max ≤5mm; C min <String spacing<C max The string spacing is qualified, and the string spacing is less than C min or greater than C max The string spacing is unqualified, 0.01mm≤C min ≤1mm, 3.5mm≤C max ≤5mm; W min <Displacement value<W max The misalignment value is qualified, and the misalignment value is less than W min or greater than W max The misalignment value is unqualified, 2mm≤W min <3mm,3mm≤W max ≤4mm.

10. The method for detecting defects of photovoltaic modules according to claim 1 or 9, characterized in that: In the photovoltaic module, each battery cell is adjacent to the other three battery cells and is distributed in a field shape, and the four battery cells form a cross-shaped gap; the four battery cells distributed in the field shape are the upper left battery cell, the upper right battery cell, the lower left battery cell and the lower right battery cell, respectively, the edge line of the upper left battery cell relative to the upper right battery cell is recorded as bianyuanxian1, the edge line of the upper right battery cell relative to the upper left battery cell is recorded as bianyuanxian2, the edge line of the upper left battery cell relative to the lower left battery cell is recorded as bianyuanxian3, the edge line of the lower left battery cell relative to the upper left battery cell is recorded as bianyuanxian4, and the edge line of the upper right battery cell relative to the lower right battery cell is recorded as b ianyuanxian5, the edge line between the lower right battery cell and the upper right battery cell is recorded as bianyuanxian6, the edge line between the lower left battery cell and the lower right battery cell is recorded as bianyuanxian7, and the edge line between the lower right battery cell and the lower left battery cell is recorded as bianyuanxian8. The misalignment value of the four battery cells = maxN, N = (|bianyuanxian1-bianyuanxian7|, |bianyuanxian2-bianyuanxian8, bianyuanxian3-bianyuanxian5, bianyuanxian4-bianyuanxian6).

Citation Information

Patent Citations

  • Photovoltaic cell grid line measuring method

    CN105140145A

  • Photovoltaic panel fault spot detection and identification method and system

    CN109525194A