Defect detection method for photovoltaic screen printing plate
Through image acquisition and processing technology, combined with feature extraction and threshold comparison methods, the limitations of the detection of small-size defects of photovoltaic screens in the existing technology are solved, and accurate detection and distinction of photovoltaic screens are achieved, and the quality and output of photovoltaic screens are improved.
Patent Information
- Application Number
- CN202411748559.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-02
AI Technical Summary
The prior art has limitations in detecting small-sized defects on photovoltaic screens, making it difficult to accurately identify and locate defects such as tiny cracks and pinholes, and it is impossible to accurately distinguish and identify different types of defects, resulting in defect classification errors.
A defect detection method of photovoltaic screen version is adopted, through image acquisition and processing, including grayscale processing, filtering and denoising, edge detection, structural element scanning and feature extraction, the feature information of the image to be detected and the normal defect-free image is compared, and the threshold range is set for comparison and judgment.
It realizes accurate and rapid detection of various defects on photovoltaic screens, improves the quality and output of photovoltaic products, and can distinguish different types of defects more accurately, reducing missed inspections and misjudgments.
Smart Images

Figure CN119850523A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of photovoltaic manufacturing, and in particular to a method for detecting defects in photovoltaic screens. Background Art
[0002] Photovoltaic screens play a vital role in the photovoltaic manufacturing process, and their quality directly affects the performance and efficiency of photovoltaic products. However, due to factors such as production technology and material quality, photovoltaic screens may have various defects during the production process, such as scratches, breakage, and contamination. If these defects are not discovered and handled in time, they will have a serious impact on the quality and output of photovoltaic products.
[0003] At present, some detection algorithms have limitations when dealing with small-sized defects. For example, some algorithms based on traditional image processing technology or simpler deep learning algorithms have difficulty in accurately identifying and locating small-sized defects such as tiny cracks and pinholes on photovoltaic panels, and are prone to missed detection or misjudgment.
[0004] Moreover, when a photovoltaic panel has a mixture of multiple defect types or irregular defect shapes, existing technologies may not be able to accurately distinguish and identify different types of defects, resulting in incorrect defect classification and affecting the accurate assessment of the quality of the photovoltaic panel.
[0005] Therefore, there is an urgent need for a method that can accurately detect photovoltaic screen defects. Summary of the invention
[0006] The purpose of the present invention is to provide a photovoltaic screen defect detection method, which can accurately and quickly detect various defects on the photovoltaic screen and improve the quality and output of photovoltaic products.
[0007] In order to solve the above-mentioned technical problems, the present invention provides a photovoltaic screen defect detection method.
[0008] A method for detecting defects in a photovoltaic screen comprises the following steps:
[0009] S1, using an image acquisition device to acquire an image of a photovoltaic screen to be inspected and an image of a normal photovoltaic screen without defects;
[0010] S2, in the image processing software, graying the image obtained in step S1, and then denoising it using filtering technology to obtain a gray-scale high-definition denoised image;
[0011] S3, performing edge detection on the image to detect the shape and size of the gap;
[0012] S4, select a structure element and use the structure element to scan the image. When all pixel values in the area covered by the structure element are foreground pixels, the central pixel is retained as a foreground pixel, otherwise it becomes a background pixel;
[0013] S5, using the selected structure element to scan the entire binary image, as long as there is a foreground pixel in the area covered by the structure element, the center pixel in the image corresponding to the center of the structure element is changed into a foreground pixel;
[0014] S6, selecting a normal photovoltaic panel standard image without defects, and repeating the image processing steps of steps S4-S5;
[0015] S7, extracting information of grayscale features, edge features, and shape features from the image to be inspected obtained in step S5 and the normal, defect-free photovoltaic panel standard image obtained in step S6, and comparing feature information between the former and the latter;
[0016] S8, setting range thresholds of grayscale features, edge features and shape features, and comparing the feature information of the image to be detected obtained in step S7 with the range thresholds.
[0017] S9, if the feature information of the image to be detected has no difference with the feature information of the normal photovoltaic panel standard image without defects, it is judged to be normal; if the feature information of the image to be detected exceeds the threshold range, it is judged to be abnormal.
[0018] Preferably, in step S9, there is a part where the feature information of the image to be detected is different from the feature information of the normal photovoltaic panel standard image without defects but does not exceed the threshold range, and the following detection steps are also included:
[0019] S91, for the image to be detected obtained in step S4, using the feature filling function in the image processing software, filling each area in the image to be detected with lines, selecting a normal photovoltaic panel standard image without defects, repeating step S4, and then using the feature filling function in the image processing software to fill each area in the image to be detected with lines;
[0020] S92, compare the image to be inspected obtained in S10 with the filling area of the normal and defect-free standard image of the photovoltaic panel. If it is within ±2 mm of the edge of the filling area of the normal and defect-free standard image of the photovoltaic panel, it is within the normal range; if it exceeds ±2 mm of the edge of the filling area, it is judged to be abnormal. Compare it with the image to be inspected obtained in S9 which has no abnormalities and makes a judgment.
[0021] Preferably, in step S3, the edge detection of the image includes finding the boundary between the target and the background or different areas in the image, calculating the gradient amplitude and direction of the image, and retaining only the pixel points with the largest amplitude in the gradient direction as edge candidate points through non-maximum suppression. Through dual threshold detection, a high threshold and a low threshold are set, and the pixel points above the high threshold are edge points, and those below the low threshold are not. The pixel points between the high threshold and the low threshold are also determined to be edge points if they are connected to the edge points, so as to obtain a continuous edge with a single pixel width, and detect the broken lines and incomplete graphics of the edge.
[0022] Preferably, in step S4, a structural element is selected, and a regular square or circular shape is selected, and the area of the shape is smaller than one quarter of the area of the image to be detected.
[0023] Preferably, in step S9, the setting of range thresholds of grayscale features, edge features and shape features is as follows: for the grayscale feature range threshold, multiple normal photovoltaic panel images are collected, and the grayscale value distribution of each area thereof is counted, and the maximum and minimum values are removed, and the maximum and minimum values of the remaining values are taken as the range threshold of the grayscale feature; for the shape feature range threshold, multiple normal photovoltaic panel images are collected, and the lower limit and upper limit of the shape threshold are counted, and the maximum and minimum values are removed, and the maximum and minimum values of the remaining values are taken as the range threshold of the shape feature; for the edge feature range threshold, the normal edge length of the line in the normal photovoltaic panel image is analyzed, and the edge information in the image is extracted using an edge detection algorithm, and then the length of each edge is calculated, and the maximum and minimum values are removed, and the maximum and minimum values of the remaining values are taken as the range threshold of the edge feature.
[0024] Preferably, in step S1, the capturing of the image of the photovoltaic screen to be inspected further includes capturing images of the same position of the photovoltaic screen from different tilt angles of 30°, 45°, and 60° of the photovoltaic screen to form an image set of the photovoltaic screen to be inspected.
[0025] Preferably, in step S6, the capturing of images of a normal and defect-free photovoltaic screen also includes capturing images of the same position of the photovoltaic screen from different tilt angles of 30°, 45°, and 60° of the photovoltaic screen, to form an image set of the current normal and defect-free photovoltaic screen.
[0026] Preferably, in step S7, the extracting edge features further includes describing the shape of the edge by means of a fitting curve, and calculating the gradient change rate of the edge and the density of edge points.
[0027] Preferably, in step S7, the extracted shape features further include features of the ratio of the shape area to the area of the circumscribed rectangle, the eccentricity, and the rectangle fit.
[0028] Preferably, in step S7, the grayscale feature extraction further includes calculating the grayscale variance and the features of the higher-order statistical moments of the grayscale histogram to more comprehensively describe the distribution characteristics and changes of the grayscale in different regions of the image.
[0029] The present invention solves the problem that the prior art cannot accurately distinguish and identify different types of defects, resulting in defect classification errors and affecting the accurate assessment of the quality of photovoltaic panels. The present invention presents the screen condition from multiple angles, making hidden defects easier to be discovered and improving the comprehensiveness of detection; through multiple feature extractions, different types of defects in photovoltaic panels can be more finely distinguished, and for tiny and fuzzy defects, they can also be identified by using regional feature filling to express lines and regional edges. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a schematic diagram of a photovoltaic screen defect detection method of the present invention. DETAILED DESCRIPTION
[0031] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of methods and systems consistent with some aspects of the present application as detailed in the attached claims.
[0032] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "the", and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0033] Example 1
[0034] like Figure 1 As shown, the present invention provides a photovoltaic screen defect detection method, comprising the following steps:
[0035] S1, collecting an image of the photovoltaic screen to be inspected through an image acquisition device;
[0036] Preferably, in step S1, the capturing of the image of the photovoltaic screen to be inspected further includes capturing images of the same position of the photovoltaic screen from different tilt angles of 30°, 45°, and 60° of the photovoltaic screen to form an image set of the photovoltaic screen to be inspected.
[0037] The present invention collects images of the same position from different tilt angles from 30°-60° of the photovoltaic screen according to the detection requirements of different types of photovoltaic screens, forming a complete image set. Light irradiation and viewing angles at different angles will allow the features of the photovoltaic screen surface to be displayed in different ways. For example, when shooting at a vertical angle, some areas located in the depressions of the screen or partially blocked may not be clearly presented, but when shooting from an oblique angle, the light can better illuminate these areas, so that the defects hidden therein (such as tiny blockages on the side of the mesh, scratches at the bottom of the line, etc.) can be exposed in the image, greatly increasing the probability of defects being discovered.
[0038] S2, in the image processing software, graying the image obtained in step S1, and then denoising it using filtering technology to obtain a gray-scale high-definition denoised image;
[0039] The first step is grayscale processing, which aims to simplify the image data while highlighting the brightness information related to the defects. After the grayscale processing is completed, the next step is to use filtering technology to denoise the image, such as using mean filtering. Its principle is to replace the central pixel value with the average value of the pixels in the neighborhood. The present invention usually uses filter templates of different sizes such as 3×3 and 5×5. Taking the 3×3 filter template as an example, for a certain pixel point in the image, the grayscale values of the 8 surrounding neighboring pixel points (plus itself, a total of 9 points) are added and the average is taken, and then assigned to the central pixel point, and the entire image is processed in this way. Mean filtering can effectively smooth out some isolated noise points, making the image look smoother;
[0040] First, perform a preliminary analysis of the image to determine the type of noise (whether it is mainly salt and pepper noise or Gaussian noise, etc.), the severity of the noise, the importance of image edges and details, and other factors. Then select an appropriate filtering method or combine several filtering methods. For example, first use median filtering to remove most of the salt and pepper noise, and then use Gaussian filtering to further smooth the image and remove the remaining Gaussian noise.
[0041] S3, performing edge detection on the image to detect the shape and size of the gap;
[0042] Preferably, in step S3, the edge detection of the image includes finding the boundary between the target and the background or different areas in the image, calculating the gradient amplitude and direction of the image, and retaining only the pixel points with the largest amplitude in the gradient direction as edge candidate points through non-maximum suppression. Through dual threshold detection, a high threshold and a low threshold are set, and the pixel points above the high threshold are edge points, and those below the low threshold are not. The pixel points between the high threshold and the low threshold are also determined to be edge points if they are connected to the edge points, so as to obtain a continuous edge with a single pixel width, and detect the broken lines and incomplete graphics of the edge. The double threshold detection method sets a high threshold and a low threshold. The present invention determines the pixel points above the high threshold as edge points. These points are the most clear and reliable part of the edge information, just like the most obvious and definite mark on the treasure path; the pixel points below the low threshold are definitely not edge points and are directly excluded; and the pixel points between the two are also determined to be edge points if they are connected to the determined edge points. This is because some edges may not reach the high threshold due to relatively slow grayscale changes or certain interference, but in fact they are still part of the edge. In this way, they are also included in the category of the edge, making the final edge more continuous and complete. For example, the present invention sets the high threshold to 80 and the low threshold to 30. For a pixel chain of a suspected edge in the image, the gradient amplitude of some pixel points is higher than 80, and these points are undisputedly identified as edge points. For some other pixel points, the gradient amplitude is between 30 and 80. At this time, it is checked whether they are connected to those determined high-amplitude edge points. If they are connected, they are also determined as edge points, and finally a complete and continuous edge contour is formed.
[0043] When performing edge detection, the S1 image set is analyzed from multiple dimensions to accurately obtain continuous and single-pixel-wide edges. This plays a decisive role in accurately capturing subtle but crucial defect features such as broken lines and incomplete graphics, and is the core basis for subsequent accurate judgment of defect conditions. First, find the boundary between the target and the background or different areas in the image, and then use specific algorithms and mathematical calculations to distinguish different parts of the photovoltaic screen image. The key information of the grayscale change of pixels in the image is used to achieve this goal, because there is usually an obvious grayscale difference at the junction of the target and the background or different areas. For example, the line part on the photovoltaic screen may have a darker grayscale, while the surrounding background area has a lighter grayscale. This grayscale change indicates the existence of the boundary. By scanning the image pixel by pixel and analyzing the changes in its grayscale value, the locations where boundaries may exist are preliminarily marked, just like circling the places that may be the junctions of different areas on a map, and further calculating the gradient amplitude and direction of the image. The gradient amplitude represents the severity of the grayscale change in the image. It is obtained by calculating the rate of change of the grayscale value of the pixel point in a certain direction, just like measuring the slope of a certain point in the terrain. The larger the slope, the more drastic the grayscale change, which means that the edge is more likely to be located here; and the direction indicates the direction of the fastest grayscale change, just like judging the direction of a mountain range. By determining this direction, the present invention can track the edge along the path where the grayscale change is most obvious. During the specific calculation, the present invention can be implemented by using common differential operators such as the Sobel operator and the Prewitt operator. These operators perform convolution operations on the image through a specific template, calculate the grayscale change rates in the horizontal and vertical directions respectively, and then synthesize the change rates in the horizontal and vertical directions through a certain mathematical formula (such as the Pythagorean theorem) to obtain the final gradient amplitude. At the same time, the direction of the gradient is determined according to the proportional relationship between the horizontal and vertical change rates. This information is used to identify the edges in the atlas and compare multiple edges of the two atlases.
[0044] S4, select a structure element and use the structure element to scan the image. When all pixel values in the area covered by the structure element are foreground pixels, the central pixel is retained as a foreground pixel, otherwise it becomes a background pixel;
[0045] The selection of a structural element, such as a square or circular regular shape, is based on many considerations.
[0046] Square structural elements, such as the common 3×3, 5×5 and other size specifications, have the characteristics of strong regularity, easy to understand and operate, and can cover the pixel area in a relatively regular manner when scanning the image. It is effective in processing photovoltaic screen image content with relatively regular shapes and relatively straight lines (such as regularly arranged lines, square battery cell areas, etc.). It can act evenly on the image in the horizontal and vertical directions. For example, when performing morphological processing on the lines on the photovoltaic screen, the square structural elements can fit the width of the lines with appropriate sizes, helping the present invention to accurately judge the integrity of the lines and whether there is local deformation.
[0047] The radius of the circular structural element can be flexibly set according to actual needs (such as a radius of 2, 3, etc.). Its advantage is that it can evenly expand the pixel influence range around the center of the circle, and is more suitable for processing image areas with curved shapes or that require natural transition processing. For example, when there are some curved lines, circular patterns, or curved holes in the photovoltaic screen, the circular structural element can better fit the shape of these target objects, avoiding the problems of abrupt edges and corners that may occur when the square structural element is processing curves, making the morphological processing effect more natural and smooth, and more in line with the actual morphological characteristics of the object in the image.
[0048] S5, using the selected structure element to scan the entire binary image, as long as there is a foreground pixel in the area covered by the structure element, the center pixel in the image corresponding to the center of the structure element is changed into a foreground pixel;
[0049] If there is a foreground pixel in the area covered by the structural element, the central pixel in the image corresponding to the center of the structural element is changed to a foreground pixel. This rule can be figuratively understood as a "diffusion" mechanism, which aims to properly connect and expand those foreground pixel areas that may be disconnected or not continuous enough, so that the outline of the target object in the image is more complete and clear, which helps to find some defects hidden in the subtle places. For example, in the photovoltaic screen image, if there are some suspected disconnections caused by various reasons (such as partial line wear, signal interference during image acquisition, etc.), the pixels at these disconnections may appear intermittent. After processing in step S4, although some isolated interfering pixels are removed, the disconnections may still be not coherent enough. When the rule of step S5 is applied and the selected structural element is used to scan the entire binary image, as long as the structural element covers even only one foreground pixel (pixel representing the line) at the broken line, the image center pixel corresponding to the center of the structural element will also be changed into a foreground pixel. By continuously scanning and processing in this way, it is possible to reconnect the originally broken lines in the image, or make those inconspicuous and intermittent lines more continuous and clear, so that the present invention can accurately judge whether it is a real broken line defect or just an illusion caused by factors such as image acquisition.
[0050] Similarly, this rule can also play a positive role in some cases where there are holes or incomplete graphics. For example, if a small part of a certain graphic on the photovoltaic screen is missing, forming some scattered foreground pixel areas, through the processing of step S5, these scattered areas can be filled and expanded to a certain extent, making the outline of the graphic more complete. The present invention can more intuitively observe the specific location and form of the incomplete graphic, and then analyze its possible impact on the overall function of the photovoltaic screen.
[0051] Moreover, this "diffusion" processing based on structural elements is also very effective in processing tiny defects in images and highlighting some weak target object features. There may be some foreground pixel change areas in the image that are difficult to detect due to uneven lighting, slight scratches, etc. Through the operation of step S5, these tiny areas can be appropriately enhanced and expanded, making them easier to identify and analyze, avoiding the situation where the features are too weak and are missed.
[0052] S6, selecting a normal photovoltaic screen standard image without defects, and repeating the image processing steps of steps S4-S5;
[0053] Preferably, in step S6, the selection of a normal and defect-free photovoltaic screen standard image is specifically to collect images of the same position of the photovoltaic screen at different tilt angles of 30°, 45°, and 60° of the photovoltaic screen, to form an image set of the current normal and defect-free photovoltaic screen. The normal and defect-free photovoltaic screen should be a photovoltaic screen product that has undergone strict quality control and is known to have no defects, and its production process, specifications, models, raw materials and other conditions should be as consistent as possible with the photovoltaic screen to be tested.
[0054] S7, extracting information on grayscale features, edge features, and shape features from the image to be inspected obtained in step S5 and the normal photovoltaic screen standard image without defects obtained in step S6, and comparing feature information between the former and the latter;
[0055] For the extraction of grayscale features, in addition to calculating the common average grayscale value, it also further covers the calculation of grayscale variance, higher-order statistical moments of grayscale histogram (such as skewness, kurtosis, etc.). The average grayscale value allows the present invention to roughly understand the overall brightness of the image, but it can only provide a more general information. The grayscale variance reflects the degree of discreteness of the grayscale value in the image. By analyzing the grayscale variance, the present invention can determine whether the grayscale distribution in different areas of the image is uniform. For example, a normal photovoltaic screen image usually has a relatively stable grayscale distribution in a certain area (such as the surface of the battery cell), and its grayscale variance is small. However, if there are stains, scratches or other defects in the area, it may cause large fluctuations in the grayscale value, thereby increasing the grayscale variance. Therefore, the grayscale variance can be used as a sensitive indicator to indicate potential defects. The higher-order statistical moments of the grayscale histogram describe the characteristics of the grayscale distribution from a more complex perspective. The skewness can tell the present invention the asymmetry of the grayscale distribution, and the kurtosis reflects the concentration of the grayscale distribution near the peak value. The combination of this information can more comprehensively describe the distribution characteristics and changes of the grayscale in different areas of the image, and can discover hidden defects through subtle changes in grayscale features.
[0056] In terms of extracting edge features, in addition to counting the basic information such as the length and direction of the edge, the shape of the edge is described by fitting curves, and the gradient change rate of the edge, the density of edge points and other multi-dimensional feature quantities are calculated at the same time. The length and direction of the edge can help the present invention preliminarily determine the existence and approximate direction of some linear defects (such as broken lines, cracks, etc.), but for more complex edge morphological changes, these basic information alone are not enough. Through the fitting curve, the present invention can fit the edge into different function forms such as straight lines, quadratic curves, spline curves, etc., and then analyze the curvature change of the edge. For example, for some curved lines on the photovoltaic screen, if the curvature of its edge changes abnormally, it is likely to mean that the line is deformed or has other defects. The gradient change rate of the edge reflects the speed of the grayscale change at the edge, which is important for judging the clarity of the edge, whether there is blur or abnormal changes caused by noise interference, and the density of the edge points can reflect the density of the edge. Some defects may cause the distribution of edge points to change. Through these more detailed edge feature analysis, no subtle changes are missed.
[0057] For the extraction of shape features, in addition to the conventional perimeter, area, and circularity (calculated by perimeter and area, the closer to 1, the closer to a circle), more diverse feature descriptions such as the ratio of the shape area to the area of the circumscribed rectangle, eccentricity, and rectangle fit are added. The perimeter and area can roughly outline the size range of the target object in the image, but the specific characteristics of the shape are not detailed enough. The ratio of the shape area to the area of the circumscribed rectangle can reflect the compactness of the shape of the target object. The eccentricity measures the narrowness of the shape by calculating the ratio of the major axis and the minor axis of the shape. The rectangle fit can measure the similarity between the shape and the rectangle. These features can be combined to present the shape characteristics of the target object in all directions. For example, when detecting whether the graphics on the photovoltaic screen are incomplete, deformed, or have foreign objects attached to cause the shape to change, abnormalities can be found by comparing these differences.
[0058] After extracting these rich and detailed feature information from the image to be detected and the standard image respectively, the next step is to conduct comparative analysis. Compare the grayscale features, edge features, and shape features of the image to be detected with the features corresponding to the standard image one by one to observe whether there are differences and the specific manifestations of the differences. For example, by comparing the grayscale variances of the two, if the grayscale variance of a certain area of the image to be detected is significantly greater than the grayscale variance of the corresponding area of the standard image, it indicates that there may be defects in the area that affect the grayscale distribution; by comparing the shape of the fitting curve of the edge, if the curvature of a certain edge in the image to be detected has a large deviation from the edge curvature of the corresponding position in the standard image, it may mean that there are edge-related defects here; when comparing shape features, if the eccentricity of a certain figure in the image to be detected is different from the eccentricity of the same figure in the standard image, it can also help the present invention to determine whether the figure has defects such as shape changes. Through such comprehensive and detailed feature comparison, the present invention is like looking for subtle differences in two seemingly similar "puzzles". Once the feature differences are found, it is possible to find clues to defects hidden in the photovoltaic screen image, providing a strong basis for subsequent defect determination links, and guiding the present invention to more accurately determine whether the photovoltaic screen corresponding to the image to be detected has defects and the type and severity of the defects.
[0059] S8, setting range thresholds of grayscale features, edge features and shape features, and comparing the feature information of the image to be detected obtained in step S7 with the range thresholds.
[0060] For the setting of the grayscale feature range threshold, we adopted a scientific method based on a large amount of data statistical analysis. Specifically, we collected multiple normal photovoltaic panel images, which covered samples from different production batches, different process conditions and different use environments to ensure the diversity and representativeness of the samples, because only in this way can the threshold range calculated by statistics fit the characteristic distribution of normal photovoltaic panel images in actual production as much as possible. Then, for each normal image collected, the grayscale value distribution of each area is counted, which is like a comprehensive "grayscale census" for each image, and the grayscale value variation range of the pixels in each area is recorded in detail. After obtaining a large amount of grayscale value data, the maximum and minimum values are removed. This is to exclude those extreme grayscale values that may be caused by accidental factors (such as abnormal lighting during the acquisition process, image noise, etc.) to avoid these abnormal values affecting the rationality of the threshold range. Finally, the maximum and minimum values of the remaining values are taken as the range threshold of the grayscale feature. For example, after statistical analysis of many normal photovoltaic panel images, it is found that the grayscale value of a specific area (such as the line area on the photovoltaic screen) is 100 at the minimum and 150 at the maximum after removing the extreme value.
[0061] [100, 150] is set as the range threshold of the grayscale feature of this region.
[0062] In the actual detection process, when analyzing the grayscale features of the corresponding area of the image to be detected, if its grayscale value exceeds the set range threshold, it means that the grayscale distribution of the area is abnormal, and there may be some defects that affect the grayscale, such as stains on the line, oxidation causing the grayscale to become darker or lighter, or foreign matter attached to the surface of the screen that changes the local reflective properties, thereby causing the grayscale value to deviate from the normal range.
[0063] There is also a rigorous and scientific process for setting the edge feature range threshold. We need to first analyze the length of the normal edges of target objects such as lines in normal photovoltaic panel images. This requires collecting a large number of normal photovoltaic panel images of different specifications and different processes as the basic data source. Use a professional edge detection algorithm (such as the scientific method used in the previous step S3, by finding the boundary between the target and the background or different areas in the image, calculating the gradient amplitude and direction of the image, and performing fine operations such as non-maximum suppression and double threshold detection) to extract the edge information in the image, and then calculate the length of each detected edge. This process is like a precise "measurement" of each edge, without missing any subtle line segments.
[0064] After obtaining a lot of edge length data, the maximum and minimum values should also be removed. This is because in the actual image acquisition and processing process, some accidental interference factors (such as pseudo edges caused by light reflection at the edge of the image, abnormal edges caused by instantaneous jitter of the acquisition device, etc.) may cause abnormal values in individual edge lengths. These abnormal values should not be included in the normal range threshold consideration range. After removing the extreme values, take the maximum and minimum values of the remaining values to determine the range threshold of the edge feature. For example, after statistical analysis of a large number of normal images, it is found that after removing the extreme values, the minimum value of the line edge length is 10 pixels and the maximum value is 50 pixels. Then the interval [10, 50] becomes the range threshold of the line edge length in the edge feature.
[0065] When inspecting an image to be inspected, if the length of some of its edges exceeds the set threshold range, it indicates that there may be defects such as broken lines, excessive edge wear, or the appearance of unnecessary new lines. For example, if the length of a line edge is detected to be far more than 50 pixels, it is possible that the line is broken, causing the originally continuous edge to be elongated; on the contrary, if the edge length is too short, far less than 10 pixels, it may mean that the line is partially excessively worn, causing a part of the originally complete edge to be missing. These situations can be discovered in time by comparing with the edge feature range threshold.
[0066] In addition to edge length, similar methods are used to set thresholds for other dimensions of edge features, such as the gradient change rate of the edge, the density of edge points, etc. Taking the gradient change rate of the edge as an example, in a normal photovoltaic panel image, the grayscale change rate at the edge is usually in a relatively stable range. By analyzing and statistically analyzing a large number of normal images, after removing the extreme values of the gradient change rate caused by noise, local image anomalies, etc., a reasonable minimum and maximum value is determined as the threshold range. When the gradient change rate of an edge in the image to be detected exceeds this range, it means that the grayscale change characteristics of the edge are abnormal. It may be due to damage to the edge, interference from stains, etc., which makes the originally clear and stable edge grayscale change irregular, which helps us judge whether there is a defect from this perspective.
[0067] The setting of the shape feature range threshold is also based on the collection and analysis of a large number of normal photovoltaic panel images. We will count the lower and upper limits of the shape threshold, which involves multiple shape feature parameters, such as the ratio of the shape area to the circumscribed rectangle area, eccentricity, rectangle fit, etc. For the parameter of the ratio of the shape area to the circumscribed rectangle area, in normal photovoltaic panel images, different graphics (such as solar cells, logo patterns, etc.) have their relatively stable ratio ranges. By counting the parameters of these graphics in many normal images, removing individual abnormal values caused by graphics drawing errors and image acquisition, the normal minimum and maximum values are determined as the range thresholds. For example, after analysis, it is found that the normal range of the ratio of the shape area to the circumscribed rectangle area of a certain type of graphics is between [0.6, 0.8]. If the ratio value corresponding to the graphics in the image to be detected is less than 0.6 or greater than 0.8, it means that the compactness of the graphics has changed abnormally, which may be due to deformation, incompleteness, or foreign matter attached to the graphics that has changed its original shape characteristics.
[0068] In terms of eccentricity, the ratio of the major axis to the minor axis of the shape is used to measure the narrowness of the shape. Under normal circumstances, the eccentricity of various graphics also fluctuates within a certain range. The eccentricity data of the corresponding graphics in different normal images are collected, and after eliminating the extreme values that obviously deviate from the normal range, a suitable threshold interval is determined, such as [0.3, 0.6]. When the eccentricity of the graphics in the image to be detected exceeds this interval, it indicates that the shape of the graphics has changed in terms of narrowness. It may be that the production process problem causes the graphics to be stretched or flattened, or the graphics are irregularly deformed due to external forces.
[0069] The rectangle fit is similar. It measures the similarity between a shape and a rectangle. A normal figure will have a corresponding reasonable rectangle fit range. After the threshold range is determined through statistical analysis of a large number of normal images, once the rectangle fit of the figure in the image to be detected exceeds this range, it means that the shape of the figure is different from the normal state, and there may be defects that affect its original regularity.
[0070] By setting the range thresholds of grayscale features, edge features and shape features in an all-round and multi-dimensional manner, and rigorously comparing the feature information of the image to be tested with these threshold ranges in actual testing, we can measure from different angles and with objective standards whether there are defects in the photovoltaic screen image to be tested, as well as where the defects may appear and how severe they are, etc., making the entire defect detection process more scientific and accurate, and providing a solid and reliable basis for judgment to ensure the quality of photovoltaic screens.
[0071] S9, if the feature information of the image to be detected has no difference with the feature information of the normal photovoltaic screen standard image without defects, it is judged to be normal; if the feature information of the image to be detected exceeds the threshold range, it is judged to be abnormal.
[0072] Preferably, in step S9, there is a part where the feature information of the image to be detected is different from the feature information of the normal photovoltaic screen standard image without defects but does not exceed the threshold range, and the following detection steps are also included:
[0073] S91, for the image to be detected obtained in step S4, using the feature filling function in the image processing software, fill in each area in the image to be detected with lines, select a normal photovoltaic screen standard image without defects, repeat step S4, and then use the feature filling function in the image processing software to fill in each area in the image to be detected with lines;
[0074] S92, compare the image to be inspected obtained in S10 with the filling area of the normal and defect-free photovoltaic screen standard image. If it is within ±2 mm of the edge of the filling area of the normal and defect-free photovoltaic screen standard image, it is within the normal range; if it exceeds ±2 mm of the edge of the filling area, it is judged to be abnormal. Compare it with the image to be inspected obtained in S9 which has no abnormalities and makes a judgment.
[0075] Preferably, in step S4, a structural element is selected, and a regular square or circular shape is selected, and the area of the shape is smaller than one quarter of the area of the image to be detected.
[0076] Preferably, in step S9, the setting of range thresholds of grayscale features, edge features and shape features is specifically as follows: the grayscale feature range threshold is collected by collecting multiple normal photovoltaic screen images, counting the grayscale value distribution of each area thereof, removing the maximum and minimum values, and taking the maximum and minimum values of the remaining values as the range threshold of the grayscale feature; the shape feature range threshold is collected by collecting multiple normal photovoltaic screen images, counting the lower limit and upper limit of the shape threshold, removing the maximum and minimum values, and taking the maximum and minimum values of the remaining values as the range threshold of the shape feature; the edge feature range threshold is analyzed by analyzing the length of the normal edge of the line in the normal photovoltaic screen image, using the edge detection algorithm to extract the edge information in the image, and then calculating the length of each edge, removing the maximum and minimum values, and taking the maximum and minimum values of the remaining values as the range threshold of the edge feature.
[0077] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A photovoltaic screen defect detection method, characterized in that: The following steps are involved: S1, using an image acquisition device to acquire an image of a photovoltaic screen to be inspected and an image of a normal photovoltaic screen without defects; S2, in the image processing software, graying the image obtained in step S1, and then denoising it using filtering technology to obtain a gray-scale high-definition denoised image; S3, performing edge detection on the image to detect the shape and size of the gap; S4, select a structure element and use the structure element to scan the image. When all pixel values in the area covered by the structure element are foreground pixels, the central pixel is retained as a foreground pixel, otherwise it becomes a background pixel; S5, using the selected structure element to scan the entire image, as long as there is a foreground pixel in the area covered by the structure element, the center pixel in the image corresponding to the center of the structure element is changed into a foreground pixel; S6, selecting a normal photovoltaic panel standard image without defects, and repeating the image processing steps of steps S4-S5; S7, extracting information of grayscale features, edge features, and shape features from the image to be inspected obtained in step S5 and the normal, defect-free photovoltaic panel standard image obtained in step S6, and comparing feature information between the former and the latter; S8, setting the range thresholds of the grayscale features, edge features and shape features, and comparing the feature information of the image to be detected obtained in step S7 with the range thresholds; S9, if the feature information of the image to be detected has no difference with the feature information of the normal photovoltaic panel standard image without defects, it is judged to be normal; if the feature information of the image to be detected exceeds the threshold range, it is judged to be abnormal.
2. A photovoltaic screen defect detection method according to claim 1, characterized in that: In the step S9, if there is a part where the feature information of the image to be detected is different from the feature information of the normal photovoltaic panel standard image without defects but does not exceed the threshold range, the following detection steps are also included: S91, for the image to be detected obtained in step S4, using the feature filling function in the image processing software, filling each area in the image to be detected with lines, selecting a normal photovoltaic panel standard image without defects, repeating step S4, and then using the feature filling function in the image processing software to fill each area in the image to be detected with lines; S92, compare the image to be inspected obtained in S10 with the filling area of the normal and defect-free standard image of the photovoltaic panel. If it is within ±2 mm of the edge of the filling area of the normal and defect-free standard image of the photovoltaic panel, it is within the normal range; if it exceeds ±2 mm of the edge of the filling area, it is judged to be abnormal. Compare it with the image to be inspected obtained in S9 which has no abnormalities and makes a judgment.
3. A photovoltaic screen defect detection method according to claim 1, characterized in that: In step S3, the edge detection of the image includes finding the boundary between the target and the background or different areas in the image, calculating the gradient amplitude and direction of the image, and retaining only the pixel points with the largest amplitude in the gradient direction as edge candidate points through non-maximum suppression. Through dual threshold detection, a high threshold and a low threshold are set. Pixel points above the high threshold are edge points, and those below the low threshold are not. Pixel points between the two are also determined to be edge points if they are connected to the edge points, so as to obtain a continuous edge with a single pixel width, and detect the broken lines and incomplete graphics of the edge.
4. A photovoltaic screen defect detection method according to claim 1, characterized in that: In step S4, a structural element is selected, which is a regular square or circular shape, and the area of the shape is smaller than one quarter of the area of the image to be detected.
5. A photovoltaic screen defect detection method according to claim 1, characterized in that: In step S9, the range thresholds of the grayscale feature, edge feature and shape feature are set, specifically, the grayscale feature range threshold is collected, a plurality of normal photovoltaic panel images are counted, the grayscale value distribution of each area is counted, the maximum and minimum values are removed, and the maximum and minimum values of the remaining values are taken as the range threshold of the grayscale feature; the shape feature range threshold is collected, a plurality of normal photovoltaic panel images are counted, the lower limit and upper limit of the shape threshold are counted, the maximum and minimum values are removed, and the maximum and minimum values of the remaining values are taken as the range threshold of the shape feature; the edge feature range threshold is analyzed, the normal edge length of the line in the normal photovoltaic panel image is extracted using the edge detection algorithm, and then the length of each edge is calculated, the maximum and minimum values are removed, and the maximum and minimum values of the remaining values are taken as the range threshold of the edge feature.
6. A photovoltaic screen defect detection method according to claim 1, characterized in that: In step S1, the image acquisition of the photovoltaic screen to be inspected also includes acquiring images of the same position of the photovoltaic screen from different tilt angles of 30°, 45°, and 60° of the photovoltaic screen to form an image set of the photovoltaic screen to be inspected.
7. A photovoltaic screen defect detection method according to claim 1, characterized in that: In step S6, the acquisition of images of a normal and defect-free photovoltaic screen also includes acquiring images of the same position of the photovoltaic screen from different tilt angles of 30°, 45°, and 60° of the photovoltaic screen to form an image set of the current normal and defect-free photovoltaic screen.
8. A photovoltaic screen defect detection method according to claim 1, characterized in that: In step S7, the edge feature extraction further includes describing the shape of the edge by means of a fitting curve, and calculating the gradient change rate of the edge and the density of the edge points.
9. A photovoltaic screen defect detection method according to claim 1, characterized in that: In step S7, the shape feature extraction also includes features of the ratio of the shape area to the circumscribed rectangle area, the eccentricity, and the rectangle fit.
10. A photovoltaic screen defect detection method according to claim 1, characterized in that: In step S7, the grayscale feature extraction further includes calculating the grayscale variance and the features of the higher-order statistical moments of the grayscale histogram to more comprehensively describe the distribution characteristics and changes of the grayscale in different regions of the image.
Citation Information
Patent Citations
Solar screen plate detection method
CN107545565A
Screen damage detection method, screen damage detection system and screen printing device
CN113447487A
Screen pattern detection method and device for solar cell
CN114022453A
Solar cell printing and screen wiping mechanism
CN114523758A
Photovoltaic printing screen defect detection method and system
CN114937013A
Cited By
Steel wheel surface scratch detection method and system
CN120495217A
A steel wheel surface scratch detection method and system
CN120495217B