Photovoltaic panel dust deposition detection method and device
Through bilateral filtering, image fusion and improved Sobel edge detection methods, the problem of low dust accumulation detection accuracy of photovoltaic panels is solved, efficient and accurate determination of dust accumulation information is achieved, and the power generation efficiency of photovoltaic panels is improved.
Patent Information
- Application Number
- CN202510612801.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-09-02
AI Technical Summary
The accuracy of dust accumulation detection of existing photovoltaic panels is not high, resulting in a decrease in power generation efficiency.
Bilateral filtering, image fusion and improved Sobel edge detection methods are adopted, including bilateral filtering and noise reduction, image binarization, image fusion and eight-dimensional Sobel edge detection. By acquiring gray-absorbing images of the photovoltaic panel surface, filtering, edge detection and information determination are performed.
It improves the accuracy and real-time performance of photovoltaic panel dust accumulation detection, reduces noise interference, shortens processing delay, meets real-time processing needs, and improves detection efficiency and accuracy.
Smart Images

Figure CN120580673A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation, and in particular to a method and device for detecting dust accumulation on photovoltaic panels. Background Art
[0002] With the rapid development of the photovoltaic industry and photovoltaic power generation technology, the impact of dust accumulation on photovoltaic panel surfaces on power generation efficiency has become increasingly prominent. In arid or dusty environments, dust accumulation can significantly reduce the light transmittance and energy conversion efficiency of photovoltaic modules, resulting in power generation losses of up to 20%. Therefore, efficient and accurate dust accumulation detection technology is of great significance for optimizing the operation and maintenance of photovoltaic power plants and improving power generation efficiency.
[0003] However, the current photovoltaic panel dust accumulation detection has the defect of low detection accuracy.
[0004] Summary of the Invention
[0005] The present invention provides a photovoltaic panel dust accumulation detection method and device, which are used to solve the defect of low photovoltaic panel dust accumulation detection accuracy in the prior art.
[0006] A method for detecting dust accumulation on photovoltaic panels, comprising:
[0007] Step 1: Obtain an image of dust accumulation on the actual photovoltaic panel surface;
[0008] Step 2: performing bilateral filtering on the dust accumulation image to reduce noise, thereby obtaining a filtered dust accumulation image;
[0009] Step 3: performing a binarization process on the filtered dust accumulation image to distinguish dust accumulation areas from non-dust accumulation areas on the filtered dust accumulation image, thereby obtaining a binarized image;
[0010] Step 4: fusing the binarized image with the filtered dust image to obtain a fused image;
[0011] Step 5: performing edge detection on the fused image to obtain an edge detection result;
[0012] Step 6: Determine dust accumulation information of the photovoltaic panel based on the edge detection result; the dust accumulation information includes: position information, area information and contour information of the dust accumulation area.
[0013] Furthermore, in the photovoltaic panel dust accumulation detection method described above, the step 2 includes: performing bilateral filtering on the dust accumulation image using the following formula:
[0014]
[0015] Among them, p is the center pixel, q is the area pixel of the center pixel p, s is the area pixel set, W p is the normalization factor, is the input image, I p bf is the filtered image, G σs is the spatial domain weight, G σr is the pixel range domain weight; is the normalization factor; is the input image pixel;
[0016] Among them G σs and G σr The calculation formula is as follows:
[0017]
[0018] Where σs is the spatial standard deviation based on the Gaussian function, σr is the grayscale standard deviation based on the Gaussian function, is the spatial horizontal coordinate of the center pixel; is the spatial ordinate of the center pixel; is the spatial horizontal coordinate of the neighborhood pixel; u is the spatial vertical coordinate of the neighborhood pixel.
[0019] Furthermore, in the photovoltaic panel dust accumulation detection method described above, σs = r / 2; σr = 2σn; r is the radius; and σn is the noise standard deviation of all pixels in the filter window.
[0020] Furthermore, in the photovoltaic panel dust accumulation detection method described above, step three includes:
[0021] Step 31: Determine a corresponding sliding template matrix with each pixel in the filtered dust accumulation image as the center;
[0022] Step 32: Calculate the adaptive threshold T of the sliding template matrix according to the following formula;
[0023]
[0024] Where A represents the sliding template matrix, sum(A) is the sum of the grayscale values of all pixels in the sliding template matrix, min(A) is the grayscale value with the minimum grayscale value in the sliding template matrix, max(A) is the grayscale value with the maximum grayscale value in the sliding template matrix, and T is the threshold of the sliding template matrix;
[0025] Step 33: Binarize each pixel in the sliding template matrix. If the pixel grayscale value is greater than or equal to the adaptive threshold T, set its grayscale value to 255 and mark it as the edge of the dust accumulation area; if the pixel grayscale value is less than the adaptive threshold T, set its grayscale value to 0 and mark it as the background area.
[0026] Step 34: traverse all pixels of the filtered dust image, repeat steps 31 to 33, and finally generate the binary image.
[0027] Furthermore, in the photovoltaic panel dust accumulation detection method described above, step 4 includes:
[0028] Step 41: performing contrast enhancement on the filtered dust accumulation image to obtain an enhanced dust accumulation image;
[0029] Step 42: For each pixel position, select the maximum value of the pixel grayscale values at the corresponding position in the binary image and the enhanced dust accumulation image as the pixel value of the position in the fused image, thereby obtaining the fused image.
[0030] Furthermore, in the photovoltaic panel dust accumulation detection method as described above, step five includes: using an eight-dimensional template to perform edge detection on the fused image; the eight-dimensional template corresponds to 8 different angles, namely: 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315°.
[0031] Furthermore, in the photovoltaic panel dust accumulation detection method described above, step five includes:
[0032] Step 51: Construct an eight-directional Sobel operator convolution kernel template, which includes convolution kernels in eight directions: 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°. Each convolution kernel corresponds to an edge detection direction at a corresponding angle.
[0033] Step 52: performing convolution operations on each pixel in the fused image using the convolution kernels in the eight directions to obtain gradient response values in the eight directions;
[0034] Step 53: Selecting the maximum value from the eight gradient response values of each pixel, and using the maximum value as the updated grayscale value of the pixel, thereby obtaining an edge-enhanced image;
[0035] Step 54: Determine an edge detection result of the fused image based on the edge-enhanced image, wherein the edge detection result includes: grayscale values and frequency distribution of pixel points;
[0036] The grayscale value and frequency distribution of the pixel are calculated according to the following formulas:
[0037]
[0038] in, Represents the grayscale value of the pixel obtained after convolution of the Sobel operator in 8 different directions; Indicates: pixel horizontal coordinate; Indicates: pixel vertical coordinate; F (l+m, k+n) indicates: enhanced window grayscale; Indicates: the i-th sobel operator module;
[0039]
[0040]
[0041] Where k represents the grayscale value at the kth level, k=0,1,2,...,L-1, L is the number of grayscale levels; represents the number of pixels when the gray value is k; n represents the total number of pixels in the image; Indicates the frequency of occurrence of different grayscale values in the dust accumulation image.
[0042] A photovoltaic panel dust accumulation detection device, comprising:
[0043] An acquisition unit, used for acquiring an image of dust accumulation on the actual photovoltaic panel surface;
[0044] a filtering unit, configured to perform bilateral filtering on the dust accumulation image to reduce noise, thereby obtaining a filtered dust accumulation image;
[0045] a binarization unit, configured to perform binarization processing on the filtered dust accumulation image to distinguish dust accumulation areas from non-dust accumulation areas on the filtered dust accumulation image, thereby obtaining a binarized image;
[0046] a fusion unit, configured to fuse the binarized image with the filtered dust image to obtain a fused image;
[0047] A detection unit, configured to perform edge detection on the fused image to obtain an edge detection result;
[0048] A determination unit is used to determine dust accumulation information of the photovoltaic panel according to the edge detection result; the dust accumulation information includes: position information, area information and contour information of the dust accumulation area.
[0049] The present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for detecting dust accumulation on a photovoltaic panel as described above is implemented;
[0050] The processor adopts TMS320DM642 DSP as the processor, and distributes image acquisition, filtering processing and feature matching to different computing units through task-level parallel architecture.
[0051] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for detecting dust accumulation on a photovoltaic panel as described above is implemented.
[0052] The photovoltaic panel dust accumulation detection method and device provided by the present invention have the following advantages:
[0053] (1) The method provided in this application, on the one hand, improves the accuracy of dust accumulation detection by using bilateral filtering to reduce the noise of the dust accumulation image; on the other hand, by fusing the binary image with the filtered dust accumulation image, the subsequent edge detection and dust accumulation information determination are made more accurate, thereby solving the problem of low detection accuracy caused by insufficient image information.
[0054] (2) The method provided in this application achieves the technical effect of compressing the feature dimension to 32 bits and achieving a template matching speed of 5800 frames per second by performing bilateral filtering on the dust accumulation image, binarizing the filtered dust accumulation image, and performing edge detection on the fused image. The low feature dimension reduces the amount of calculation, and the fast matching speed enables the feature matching and positioning process to be completed quickly, further improving the real-time performance of the detection.
[0055] (3) The method provided in this application uses bilateral filtering technology to reduce noise while maintaining image edge information, allowing subsequent processing steps to be performed based on a clearer image, thereby reducing repeated processing and erroneous judgments caused by noise interference and improving processing efficiency. At the same time, combined with an improved Sobel edge detection method, it can reduce the interference of noise on edge detection, thereby obtaining clearer dust accumulation edge information, thereby further improving detection accuracy.
[0056] (5) The method provided in this application determines the dust accumulation information of the photovoltaic panel through edge detection results, which can more quickly determine the location, area and contour information of the dust accumulation area, thereby improving the real-time performance of the entire dust accumulation monitoring process.
[0057] (4) The electronic device provided in this application uses a multi-core DSP platform as the core to build an image processing platform for infrared image recognition and processing to achieve detection functions, which improves the real-time performance of detection compared to computer vision methods. Specifically, by adopting a multi-core DSP platform and a task-level parallel architecture, tasks such as image acquisition, filtering processing and feature matching are executed in parallel, avoiding task waiting and significantly shortening processing delays. The measured processing delay is controlled within 14.4 milliseconds, which fully meets the real-time processing requirements of 60 frames per second at 4K resolution. Compared with traditional computer vision methods, the real-time performance of detection is greatly improved. Moreover, the improved Sobel edge detection method is 37% faster than the traditional Sobel edge detection method, and the edge detection task can be completed in a shorter time, thereby improving the efficiency of the entire dust detection process. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A schematic flow chart of the photovoltaic panel dust accumulation detection method provided by the present invention;
[0059] Figure 2 Schematic diagram of the convolution kernel template corresponding to the Sobel algorithm provided by the present invention;
[0060] Figure 3 Schematic diagram of the existing Sobel operator detection results;
[0061] Figure 4 Schematic diagram of the improved Sobel operator detection results provided by the present invention;
[0062] Figure 5 This is a schematic diagram of the structure of the photovoltaic panel dust accumulation detection device provided by the present invention;
[0063] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0064] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0065] Figure 1 The schematic diagram of the photovoltaic panel dust accumulation detection method provided by the present invention is as follows: Figure 1 As shown, the method includes:
[0066] Step 1: Obtain an actual dust accumulation image on the photovoltaic panel surface.
[0067] Specifically, the following methods can be used to obtain dust accumulation images:
[0068] Method 1: Under sufficient lighting conditions, use a visible light camera (such as an industrial camera or a surveillance camera) to directly photograph the surface of the photovoltaic panel. The distribution of dust accumulation is reflected by the difference in grayscale brightness or texture changes, thereby obtaining a dust accumulation image.
[0069] Method 2: Because dust accumulation can cause abnormal temperature distribution on the surface of photovoltaic panels (heat dissipation in dusty areas is hindered, resulting in higher temperatures than in clean areas), an infrared thermal imager can be used to capture temperature difference images to obtain dust accumulation images.
[0070] Method 3: The drone is equipped with a multispectral camera to obtain dust accumulation images through the spectral reflectance differences in different bands (such as visible light and near-infrared).
[0071] Step 2: Perform bilateral filtering on the dust accumulation image to reduce noise, thereby obtaining a filtered dust accumulation image.
[0072] Specifically, bilateral filtering is a nonlinear filtering method primarily used for image smoothing and noise removal, while effectively preserving edge information. This method combines spatial distance and pixel value similarity to smooth images. This filter maintains edge information while smoothing the image, avoiding the edge blurring common in traditional filters. This allows for the removal of noise while retaining high-frequency details of dust-accumulated edges, effectively distinguishing between dust-accumulated and non-dust-accumulated areas during subsequent binarization processing.
[0073] The method provided in this application uses bilateral filtering for noise reduction, which effectively retains the edge information of the dust accumulation area while removing noise, avoiding the problem of edge blurring that may be caused by traditional filtering methods, and providing higher quality image data for subsequent image segmentation and edge detection.
[0074] Step three: performing binarization processing on the filtered dust accumulation image to distinguish dust accumulation areas from non-dust accumulation areas on the filtered dust accumulation image, thereby obtaining a binarized image.
[0075] Specifically, images of dust-accumulated photovoltaic panels often have complex grayscale distributions and uneven brightness conditions, resulting in large variations in contrast between dusty areas and the background, making it difficult to accurately extract dust-accumulated areas. Therefore, it is necessary to perform binarization processing on the filtered dust-accumulated image to distinguish between dust-accumulated and non-dust-accumulated areas.
[0076] Step 4: Fusing the binarized image with the filtered dust image to obtain a fused image.
[0077] Specifically, the binarized image provides coarse-grained segmentation by distinguishing between dusty and non-dusty areas, while the filtered image retains image details (such as texture and illumination changes). This application fuses the binarized image with the filtered dusty image to compensate for edge loss in the binarized image due to noise or threshold deviation, while also avoiding the loss of bright area information in the filtered image due to filtering. Through fusion, this application enables the fused image to have both clear dusty edges (from binarization) and complete bright area details (from the filtered image), making the dusty contours of the fused image more complete and the final detection more accurate.
[0078] Step 5: Perform edge detection on the fused image to obtain an edge detection result.
[0079] Specifically, the fused image has both the clarity of regional segmentation and the completeness of details, making the edge detection results more continuous and accurate, especially the ability to recognize small branches and weak edges of dust accumulation contours.
[0080] The present invention can effectively identify dust accumulation boundaries by performing edge detection on the fused image, thereby improving detection accuracy.
[0081] Step 6: Determine dust accumulation information of the photovoltaic panel based on the edge detection result; the dust accumulation information includes: position information, area information and contour information of the dust accumulation area.
[0082] Specifically, this method uses morphological operations (such as closing operations) on edge detection results to connect broken edges and form closed regions. It then uses connected region analysis to mark dusty regions and output their position, area, and contour information.
[0083] The method provided by the present invention first performs bilateral filtering on the dust accumulation image, then binarizes the filtered dust accumulation image, and then fuses the binarized image with the filtered dust accumulation image, and detects the fused image, thereby effectively improving the accuracy of photovoltaic panel dust accumulation detection.
[0084] Furthermore, the present invention performs bilateral filtering on the dust accumulation image, and the calculation formula of the bilateral filtering is as follows:
[0085] (1)
[0086] (2)
[0087] Among them, p is the center pixel, q is the area pixel of the center pixel p, s is the area pixel set, W p is the normalization factor, is the input image, I p bf is the filtered image, G σsis the spatial domain weight, G σr is the pixel range domain weight; is the normalization factor; is the input image pixel;
[0088] Among them G σs and G σr The calculation formula is as follows:
[0089] (3)
[0090] (4)
[0091] Where σs is the spatial standard deviation based on the Gaussian function, σr is the grayscale standard deviation based on the Gaussian function, is the spatial horizontal coordinate of the center pixel (such as the horizontal position of point p); is the spatial vertical coordinate of the center pixel (such as the vertical position of point p); is the spatial horizontal coordinate of the neighborhood pixel (such as the horizontal position of point q); u is the spatial vertical coordinate of the neighborhood pixel (such as the position of point q).
[0092] Specifically, the present invention uses bilateral filtering to perform noise reduction and smoothing processing on the dust accumulation image of photovoltaic modules. Bilateral filtering is used for image smoothing and noise removal. It can effectively retain the edge information of the image while combining the two factors of spatial distance and pixel value similarity to smooth the image. This filter can maintain edge information while smoothing the image, avoiding the edge blurring problem common in traditional filters. Bilateral filtering includes two main weight functions: spatial weight function and gray value weight function. The spatial weight function determines the weight based on the distance between pixels. Pixels that are closer have greater weights, and pixels that are farther away have smaller weights. The gray value weight function determines the weight based on the difference in pixel values. Pixels with smaller differences in pixel values have higher weights, while pixels with larger differences in pixel values have lower weights.
[0093] Furthermore, σs,=r / 2; σr=2σn; r is the radius; σn is the noise standard deviation of all pixels in the filter window.
[0094] Specifically, since σs is the spatial standard deviation of a Gaussian function and σr is the grayscale standard deviation of a Gaussian function, they control the attenuation of spatial and pixel-domain weights, respectively, and directly determine the performance of the bilateral filter. In practical applications, using relatively fixed parameters will not achieve good edge-preserving denoising results. To achieve better edge-preserving denoising results, this paper improves the selection of key bilateral filtering parameters for the research object of photovoltaic module dust accumulation images:
[0095] Take σs = r / 2. Since 95% of the components of the Gaussian function are concentrated between [-2σs, 2σs], σs can be determined by the radius r. Take σr = 2σn, where σn is the noise standard deviation of all pixels in the filter window, which can be obtained using the probability distribution function method.
[0096] Furthermore, the following describes how to perform binarization processing on the filtered dust accumulation image to distinguish dust accumulation areas from non-dust accumulation areas on the filtered dust accumulation image, thereby obtaining a binarized image. Specifically, the following steps are included:
[0097] Step 31: Taking each pixel point in the filtered dust accumulation image as the center, determine the corresponding sliding template matrix.
[0098] Step 32: Calculate the adaptive threshold T of the sliding template matrix according to the following formula;
[0099] (5)
[0100] Where A represents the 3x3 template matrix composed of pixels, sum(A) is the sum of the grayscale values of all pixels in the sliding template matrix, min(A) is the grayscale value with the minimum grayscale value in the sliding template matrix, max(A) is the grayscale value with the maximum grayscale value in the sliding template matrix, and T is the threshold adaptively determined for the 3x3 template. After determining the adaptive threshold for each template, pixels within each template with grayscale values greater than the adaptive threshold T are set to 255, marking them as the edge of the dust accumulation area. Pixels with grayscale values less than the adaptive threshold are set to 0, marking them as the background area. This calculation is repeated for all pixels in the template matrix of the image to obtain a binary image of the dust accumulation image.
[0101] The method provided by the present invention can, on the one hand, effectively eliminate the influence of outlier noise on the threshold by excluding the extreme values (minimum grayscale value sum(A) and maximum grayscale value sum(A)) within the template matrix; on the other hand, by using the grayscale mean of the remaining 7 pixels to calculate the adaptive threshold T, the accuracy of the adaptive threshold T can be improved, thereby improving the processing accuracy of the binarized image.
[0102] Step 33: Binarize each pixel in the sliding template matrix. If the pixel grayscale value is greater than or equal to the adaptive threshold T, set its grayscale value to 255 and mark it as the edge of the dust accumulation area; if the pixel grayscale value is less than the adaptive threshold T, set its grayscale value to 0 and mark it as the background area.
[0103] Step 34: traverse all pixels of the filtered dust image, repeat steps 31 to 33, and finally generate the binary image.
[0104] By selecting an appropriate threshold, the present invention can convert an image with 256 grayscale levels into a binary image with local features and an overall image. Using adaptive dynamic threshold processing, within a sliding template matrix, based on the threshold of the template's center pixel, points with grayscale values greater than or equal to the threshold are identified as background, with the grayscale value set to 255. Points with grayscale values less than the threshold are identified as the surface of the photovoltaic module (foreground), effectively improving the accuracy of distinguishing between dust-accumulated and non-dust-accumulated areas.
[0105] Furthermore, the sliding template matrix is a 3×3 template matrix.
[0106] Specifically, since the sliding template matrix provided in this application is a 3×3 template matrix, since only 9 pixels need to be processed, the speed of image processing can be effectively improved; on the other hand, the present invention adopts a 3×3 template, the size of which can just cover the local range of a typical dust accumulation area, thereby effectively improving the capture accuracy of the dust accumulation edge.
[0107] Furthermore, the following describes how to fuse the binary image with the filtered dust image, specifically including the following solutions:
[0108] Step 41: performing contrast enhancement on the filtered dust accumulation image to obtain an enhanced dust accumulation image.
[0109] Specifically, although bilateral filtering removes noise from an image, the smoothing process may reduce the contrast between dusty areas and the background (especially areas with weak or light dust accumulation). This application uses contrast enhancement to stretch the grayscale difference between dusty and clean areas, making details such as the texture and edges of the dust accumulation clearer. For example, if the grayscale values of the dusty area in the filtered image are 50,80, they may be expanded to 30,120 after enhancement, thereby significantly improving the local contrast.
[0110] Step 42: For each pixel position, select the maximum value of the pixel grayscale values at the corresponding position in the binary image and the enhanced dust accumulation image as the pixel value of the position in the fused image, thereby obtaining the fused image.
[0111] Specifically, under the premise that the binarized image and the filtered dust accumulation image are completely aligned, the present invention compares the pixel values of the two images at each pixel point and takes the larger one as the fusion result. This can highlight the bright parts and edge information in the two images, so that the fused image can better reflect the dust accumulation characteristics, thereby providing more accurate image data for the next step of edge detection.
[0112] Furthermore, the present invention uses an eight-dimensional template to perform edge detection on the fused image; the eight-dimensional template corresponds to eight different angles, namely: 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315°.
[0113] Specifically, the present invention uses an improved Sobel operator to extract features from images for edge detection. The principle of existing Sobel operator detection is: at the edge of the image, the pixel brightness fluctuates greatly, that is, the gradient value is large. Therefore, accurate pixel edge information is obtained by calculating the gradient in both the horizontal and vertical directions, and the amount of calculation is reduced. Although the existing Sobel algorithm is simple to implement and has high operating efficiency, its defects are also significant: only a two-dimensional template is used to perform edge recognition tasks, which results in inaccurate dust feature extraction; in addition, since this application regards all pixels whose grayscale values exceed the set threshold as boundary points, this judgment standard is relatively loose. Therefore, if the existing Sobel operator is used for detection, some pixels containing a lot of noise may be mistakenly marked as boundary points. The improved Sobel algorithm provided by this application, by expanding the convolution kernel template from two dimensions to eight dimensions, Figure 2 The convolution kernel template diagram corresponding to the Sobel algorithm provided by the present invention is as follows: Figure 2 As shown, this application upgrades the two-dimensional template in the original Sobel algorithm to eight dimensions, and performs special optimization processing for different angles (including 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315°). The fused image is integrated using the Sobel algorithm in eight directions to perform integration operations on each quadrant element to obtain new values, effectively enhancing the edge recognition capability.
[0114] Since dust accumulation can cause grayscale changes on the surface of the photovoltaic panel (such as the contrast between dark areas where dust accumulates and bright areas in clean areas), and the dust accumulation may be unevenly distributed or locally concentrated, this application uses Sobel eight-directional template gradient calculation to capture edge details at different angles (such as the diffusion shape of dust accumulation), thereby accurately outlining the edges of the dust accumulation area, thereby further improving the detection accuracy.
[0115] Furthermore, the following describes in detail how to use the improved Sobel operator to perform edge detection on the fused image, which specifically includes the following steps:
[0116] Step 51: Construct an eight-directional Sobel operator convolution kernel template, which includes convolution kernels in eight directions: 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°. Each convolution kernel corresponds to an edge detection direction at a corresponding angle. These convolution kernels are used to detect edges in different directions in the image.
[0117] Step 52: Perform convolution operations on each pixel in the fused image using the convolution kernels in the eight directions to obtain gradient response values in the eight directions.
[0118] Specifically, for each pixel in the fused image, a convolution operation is performed respectively using the convolution kernels in the eight directions constructed in step 51. Through the convolution operation, the gradient response value of each pixel in the eight directions is obtained.
[0119] Step 53: Select the maximum value from the eight gradient response values of each pixel point, and use the maximum value as the updated grayscale value of the pixel point, thereby obtaining an edge enhancement image.
[0120] Specifically, the eight gradient response values of each pixel represent the degree of brightness change of the pixel in different directions. The larger the gradient value, the more drastic the brightness change in that direction, and the more likely it is an edge; and edges may appear in any direction. This application selects the maximum gradient response value of each pixel in eight directions to ensure that no matter which direction the edge is in, it can be effectively detected. The maximum gradient response value reflects the most significant brightness change of the pixel in all directions, and therefore best represents whether the point is an edge point. After obtaining the maximum gradient response value of each pixel, these values are used as new grayscale values to form an edge-enhanced image. Since the gradient values of edge points are large, the grayscale values of these points will be higher in the edge-enhanced image, making them appear brighter visually and the edges more prominent.
[0121] The method provided in this application effectively enhances edge information in an image by selecting the maximum value from the eight gradient response values of each pixel and using this maximum value as the updated grayscale value, resulting in an edge-enhanced image. This image highlights the outline of objects, facilitating subsequent image analysis and recognition.
[0122] Step 54: Determine an edge detection result of the fused image based on the edge-enhanced image, wherein the edge detection result includes: grayscale values and frequency distribution of pixel points;
[0123] The grayscale value and frequency distribution of the pixel are calculated according to the following formulas:
[0124] (6)
[0125] in, Represents the grayscale value of the pixel obtained after convolution of the Sobel operator in 8 different directions; Indicates: pixel horizontal coordinate; Indicates: pixel vertical coordinate; F (l+m, k+n) indicates: enhanced window grayscale; Represents: the i-th sobel operator module.
[0126] This application calculates the grayscale values of pixels after convolution with the Sobel operator at eight different angles. Z = 1 to 8 represents eight possible angles from 0° to 315°, which are used to identify boundaries. Each angle has its own specific Sobel operator convolution kernel template Mz+. This application assigns the maximum value of the convolution output of these eight operator modules to the pixel at the center of the corresponding image area to update the grayscale value of this pixel.
[0127] The following formula can be used to count the frequency of different grayscale values in the image.
[0128] (7)
[0129] (8)
[0130] Where: k is the gray value at the kth level, & = 0, 1, ..., -1, where L is the number of gray levels; n k -- the number of pixels at grayscale value k; n -- the total number of pixels in the image. A grayscale histogram is generated based on the collected dust component image. Incorporating the concept of average grayscale value, the average grayscale value of all pixels in the image is calculated. Grayscale value typically represents the brightness of a pixel, ranging from 0 (pure black) to 255 (pure white).
[0131] Specifically, dust accumulation areas usually show different grayscale values in the image from the surrounding non-dust accumulation areas. Generally speaking, due to the coverage of dust, the ability of dust accumulation areas to reflect light is different from that of clean photovoltaic panel surfaces, resulting in different grayscales in the image. By analyzing the grayscale value distribution of pixel points, the present application can find areas where the grayscale values significantly deviate from the grayscale values of normal non-dust accumulation areas. These areas are likely to be dust accumulation areas, thereby determining the location of the dust accumulation areas. After determining the location of the dust accumulation area, the area of the dust accumulation area can be calculated by counting the number of pixels in the dust accumulation area. Specifically, a grayscale value range is set, and the pixels whose grayscale values fall within this range are regarded as pixels in the dust accumulation area. Then, the number of these pixels is counted, and combined with information such as the resolution of the image, the area of the dust accumulation area can be calculated.
[0132] Frequency distribution can reflect how frequently different grayscale values appear in an image. If the frequency of a certain grayscale value in an image suddenly increases, and that grayscale value matches the expected grayscale value of a dust accumulation area, we can further confirm that the area corresponding to that grayscale value is a dust accumulation area, assisting in locating the dust accumulation area. Frequency distribution can help determine the appropriate grayscale value range. By analyzing the frequency distribution curve, we can find the frequency peak area corresponding to the grayscale value of the dust accumulation area, thereby more accurately determining the grayscale value range used to count the pixels in the dust accumulation area and improving the accuracy of area calculation.
[0133] In summary, this application can determine the location information, area information and contour information of the dust accumulation area of the photovoltaic panel by analyzing the grayscale value and frequency distribution of pixel points and utilizing the difference in grayscale characteristics between the dust accumulation area and the non-dust accumulation area.
[0134] To verify that the improved Sobel method used in this application can better highlight the characteristics of the dust accumulation degree of photovoltaic modules, such as Figure 3 and Figure 4 As shown in FIG, the SIFT feature matching algorithm is used to detect the feature points of the image after the operator is improved. It can be seen that after the improved method, the number of feature points extracted from the image is significantly increased.
[0135] To evaluate the improvement in image quality and characteristics after PV module dust image processing and the improved Sobel operator extraction process, this application conducted a statistical analysis of image characteristic parameters, including entropy (EN), peak signal-to-noise ratio (PSNR), image mutual information (MI), and Qabf value. These parameters were compared to determine the specific improvement in image quality. The relevant data is detailed in Table 1. Entropy (EN) measures the amount of uniform information contained in the PV module dust image, while PSNR reflects the similarity between the pre-modified image and its original version, with larger values indicating closer similarity. Image mutual information (MI) and Qabf values represent the gradient of edge features in the dust image, with larger values indicating more pronounced edges.
[0136] Table 1 Comparison of dust accumulation image processing and operator parameters before and after improvement
[0137] Original image Preprocessing images Traditional Sobel operator extraction Improved Sobel operator extraction Image quality EN 7.051 7.890 6.075 6.973 11.8% / 14.80% MI 8.015 8.724 6.297 6.892 8.84% / 9.45% PSNR 59.904 63.425 53.984 59.23 5.88% / 5.25% Qabf / / 0.554 0.619 6.50%
[0138] It can be clearly seen from Table 1 that the traditional Sobel operator is limited to identifying horizontal and vertical boundaries and is not aware of missing boundaries in other directions. This is because the traditional Sobel operator is easily interfered by noise, resulting in poor noise suppression effect. The improved Sobel operator provided in this application can not only effectively suppress noise, but also clearly detect component partitions and dust accumulation levels, thereby clearly detecting the general outline of the dust accumulation area. Therefore, when processing photovoltaic component dust accumulation images with low contrast, the traditional Sobel algorithm often has difficulty identifying the problem from the background, while the method provided in this application can also show excellent detection results in this case.
[0139] The photovoltaic panel dust accumulation detection device provided by the present invention is described below. The photovoltaic panel dust accumulation detection device described below and the photovoltaic panel dust accumulation detection method described above can be referenced to each other.
[0140] Figure 5 This is a schematic diagram of the structure of the photovoltaic panel dust accumulation detection device provided by the present invention, as shown in FIG. Figure 5 As shown, the device includes:
[0141] An acquisition unit 501 is used to acquire an image of dust accumulation on the actual photovoltaic panel surface;
[0142] A filtering unit 502 is configured to perform bilateral filtering on the dust accumulation image to reduce noise, thereby obtaining a filtered dust accumulation image.
[0143] A binarization unit 503 is configured to perform binarization processing on the filtered dust accumulation image to distinguish dust accumulation areas from non-dust accumulation areas on the filtered dust accumulation image, thereby obtaining a binarized image.
[0144] A fusion unit 504 is configured to fuse the binarized image with the filtered dust image to obtain a fused image;
[0145] A detection unit 505 is configured to perform edge detection on the fused image to obtain an edge detection result;
[0146] The determination unit 506 is configured to determine dust accumulation information of the photovoltaic panel according to the edge detection result; the dust accumulation information includes: position information, area information, and contour information of the dust accumulation area.
[0147] Figure 6 An example of a physical structure diagram of an electronic device is shown below. Figure 6As shown, the electronic device may include: a processor 610, a communications interface 820, a memory 630, and a communication bus 640, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the photovoltaic panel dust accumulation detection method, which includes:
[0148] Step 1: Obtain an image of dust accumulation on the actual photovoltaic panel surface;
[0149] Step 2: performing bilateral filtering on the dust accumulation image to reduce noise, thereby obtaining a filtered dust accumulation image;
[0150] Step 3: performing a binarization process on the filtered dust accumulation image to distinguish dust accumulation areas from non-dust accumulation areas on the filtered dust accumulation image, thereby obtaining a binarized image;
[0151] Step 4: fusing the binarized image with the filtered dust image to obtain a fused image;
[0152] Step 5: performing edge detection on the fused image to obtain an edge detection result;
[0153] Step 6: Determine dust accumulation information of the photovoltaic panel based on the edge detection result; the dust accumulation information includes: position information, area information and contour information of the dust accumulation area.
[0154] In addition, the logic instructions in the aforementioned memory 630 can be implemented in the form of a software functional unit and, when sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0155] The processor provided in the embodiment of the present invention adopts TMS320DM642 DSP as a processor, and distributes image acquisition, filtering processing and feature matching to different computing units through a task-level parallel architecture.
[0156] On the other hand, the present invention further provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the photovoltaic panel dust accumulation detection method provided by the above methods, which includes:
[0157] A method for detecting dust accumulation on photovoltaic panels, comprising:
[0158] Step 1: Obtain an image of dust accumulation on the actual photovoltaic panel surface;
[0159] Step 2: performing bilateral filtering on the dust accumulation image to reduce noise, thereby obtaining a filtered dust accumulation image;
[0160] Step 3: performing a binarization process on the filtered dust accumulation image to distinguish dust accumulation areas from non-dust accumulation areas on the filtered dust accumulation image, thereby obtaining a binarized image;
[0161] Step 4: fusing the binarized image with the filtered dust image to obtain a fused image;
[0162] Step 5: performing edge detection on the fused image to obtain an edge detection result;
[0163] Step 6: Determine dust accumulation information of the photovoltaic panel based on the edge detection result; the dust accumulation information includes: position information, area information and contour information of the dust accumulation area.
[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for detecting dust accumulation on photovoltaic panels, characterized in that: include: Step 1: Obtain an image of dust accumulation on the actual photovoltaic panel surface; Step 2: performing bilateral filtering on the dust accumulation image to reduce noise, thereby obtaining a filtered dust accumulation image; Step 3: performing a binarization process on the filtered dust accumulation image to distinguish dust accumulation areas from non-dust accumulation areas on the filtered dust accumulation image, thereby obtaining a binarized image; Step 4: fusing the binarized image with the filtered dust image to obtain a fused image; Step 5: performing edge detection on the fused image to obtain an edge detection result; Step 6: Determine dust accumulation information of the photovoltaic panel based on the edge detection result; The dust accumulation information includes: position information, area information and contour information of the dust accumulation area.
2. The photovoltaic panel dust accumulation detection method according to claim 1, characterized in that: The second step includes: performing bilateral filtering on the dust accumulation image using the following formula: Among them, p is the center pixel, q is the area pixel of the center pixel p, s is the area pixel set, W p is the normalization factor, is the input image, I p bf is the filtered image, G σs is the spatial domain weight, G σr is the pixel range domain weight; is the normalization factor; is the input image pixel; Among them G σs and G σr The calculation formula is as follows: Where σs is the spatial standard deviation based on the Gaussian function, σr is the grayscale standard deviation based on the Gaussian function, is the spatial horizontal coordinate of the center pixel; is the spatial ordinate of the center pixel; is the spatial horizontal coordinate of the neighborhood pixel; u is the spatial vertical coordinate of the neighborhood pixel.
3. The photovoltaic panel dust accumulation detection method according to claim 2, characterized in that: The σs,=r / 2; σr=2σn; r is the radius; σn is the noise standard deviation of all pixels in the filter window.
4. The photovoltaic panel dust accumulation detection method according to claim 1, characterized in that: The step three includes: Step 31: Determine a corresponding sliding template matrix with each pixel in the filtered dust accumulation image as the center; Step 32: Calculate the adaptive threshold T of the sliding template matrix according to the following formula; Where A represents the sliding template matrix, sum(A) is the sum of the grayscale values of all pixels in the sliding template matrix, min(A) is the grayscale value with the minimum grayscale value in the sliding template matrix, max(A) is the grayscale value with the maximum grayscale value in the sliding template matrix, and T is the threshold of the sliding template matrix; Step 33: Binarize each pixel in the sliding template matrix. If the pixel grayscale value is greater than or equal to the adaptive threshold T, set its grayscale value to 255 and mark it as the edge of the dust accumulation area; if the pixel grayscale value is less than the adaptive threshold T, set its grayscale value to 0 and mark it as the background area. Step 34: traverse all pixels of the filtered dust image, repeat steps 31 to 33, and finally generate the binary image.
5. The photovoltaic panel dust accumulation detection method according to claim 1, characterized in that: The fourth step includes: Step 41: performing contrast enhancement on the filtered dust accumulation image to obtain an enhanced dust accumulation image; Step 42: For each pixel position, select the maximum value of the pixel grayscale values at the corresponding position in the binary image and the enhanced dust accumulation image as the pixel value of the position in the fused image, thereby obtaining the fused image.
6. The photovoltaic panel dust accumulation detection method according to claim 1, characterized in that: The step five includes: performing edge detection on the fused image using an eight-dimensional template; the eight-dimensional template corresponds to eight different angles, namely: 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315°.
7. The photovoltaic panel dust accumulation detection method according to claim 6, characterized in that: The step five includes: Step 51: Construct an eight-directional Sobel operator convolution kernel template, which includes convolution kernels in eight directions: 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°. Each convolution kernel corresponds to an edge detection direction at a corresponding angle. Step 52: performing convolution operations on each pixel in the fused image using the convolution kernels in the eight directions to obtain gradient response values in the eight directions; Step 53: Selecting the maximum value from the eight gradient response values of each pixel, and using the maximum value as the updated grayscale value of the pixel, thereby obtaining an edge-enhanced image; Step 54: Determine an edge detection result of the fused image based on the edge-enhanced image, wherein the edge detection result includes: grayscale values and frequency distribution of pixel points; The grayscale value and frequency distribution of the pixel are calculated according to the following formulas: in, Represents the grayscale value of the pixel obtained after convolution of the Sobel operator in 8 different directions; Indicates: pixel horizontal coordinate; Indicates: pixel vertical coordinate; F (l+m, k+n) indicates: enhanced window grayscale; Indicates: the i-th sobel operator module; Where k represents the grayscale value at the kth level, k=0,1,2,...,L-1, L is the number of grayscale levels; represents the number of pixels when the gray value is k; n represents the total number of pixels in the image; Indicates the frequency of occurrence of different grayscale values in the dust accumulation image.
8. A photovoltaic panel dust accumulation detection device, characterized in that: include: An acquisition unit, used for acquiring an image of dust accumulation on the actual photovoltaic panel surface; a filtering unit, configured to perform bilateral filtering on the dust accumulation image to reduce noise, thereby obtaining a filtered dust accumulation image; a binarization unit, configured to perform binarization processing on the filtered dust accumulation image to distinguish dust accumulation areas from non-dust accumulation areas on the filtered dust accumulation image, thereby obtaining a binarized image; a fusion unit, configured to fuse the binarized image with the filtered dust image to obtain a fused image; A detection unit, configured to perform edge detection on the fused image to obtain an edge detection result; a determination unit, configured to determine dust accumulation information of the photovoltaic panel based on the edge detection result; The dust accumulation information includes: position information, area information and contour information of the dust accumulation area.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the photovoltaic panel dust accumulation detection method according to any one of claims 1 to 7 is implemented; The processor adopts TMS320DM642 DSP as the processor, and distributes image acquisition, filtering processing and feature matching to different computing units through task-level parallel architecture.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the photovoltaic panel dust accumulation detection method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Photovoltaic dust deposition degree detection method based on multi-spectral image of unmanned aerial vehicle
CN121708514A