A photovoltaic panel defect detection method based on unmanned aerial vehicle vision
Patent Information
- Application Number
- CN202611486937.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-23
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]然而,在实际无人机巡检过程中,光伏面板图像质量容易受到外部环境光照变化的影响,尤其是在多云天气条件下,移动云层会在光伏面板表面形成大范围非均匀阴影区域,该类阴影在图像中通常表现为低亮度区域,其灰度特征容易与光伏面板表面的污染区域、局部热斑区域甚至部分缺陷区域产生相似性,导致基于亮度阈值分割或传统图像增强方法难以准确区分环境光照变化与真实面板异常
[0021]1、本发明通过对无人机采集的光伏面板图像中的亮度变化特征进行分析,能够有效降低多云天气下云层阴影对检测结果的干扰,避免将由环境光照变化形成的低亮度区域误判为光伏面板表面缺陷,提高复杂光照条件下缺陷检测的准确性;
Smart Images

Figure CN123015543A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drone vision technology, specifically to a method for detecting defects in photovoltaic panels based on drone vision. Background Technology
[0002] With the rapid development of the new energy industry, the installed capacity of photovoltaic power generation systems continues to expand. As the core energy conversion component in photovoltaic power generation systems, the operating status of photovoltaic panels directly affects the power generation efficiency and equipment safety of photovoltaic power plants. Since photovoltaic panels are typically installed in large-area arrays, manual inspection methods suffer from problems such as long inspection cycles, limited coverage, and high risks associated with high-altitude operations. In recent years, intelligent inspection methods for photovoltaic panels based on UAV visual acquisition technology have been gradually applied to the photovoltaic operation and maintenance field. By using visible light cameras and other visual acquisition equipment to obtain images of the photovoltaic module surface, and utilizing image analysis technology, automatic detection of abnormal conditions such as cracks, stains, and hot spots is achieved, improving the automation level of photovoltaic equipment inspection.
[0003] However, in actual drone inspections, the image quality of photovoltaic panels is easily affected by changes in ambient light, especially in cloudy weather. Moving clouds can create large, non-uniform shadow areas on the photovoltaic panel surface. These shadows typically appear as low-brightness areas in the image, and their grayscale characteristics can easily resemble contaminated areas, localized hot spots, or even some defective areas on the photovoltaic panel surface. This makes it difficult for brightness threshold segmentation or traditional image enhancement methods to accurately distinguish between changes in ambient light and actual panel anomalies. Furthermore, simple brightness compensation or overall contrast enhancement methods can easily alter the original texture distribution of the image, weakening the subtle defect features hidden in the shadow areas and thus affecting the accuracy of subsequent defect identification results. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method for detecting defects in photovoltaic panels based on UAV vision.
[0005] To achieve the above objectives, the technical solution of the present invention is as follows:
[0006] In a first aspect, the present invention discloses a method for detecting defects in photovoltaic panels based on UAV vision, comprising the following steps:
[0007] Acquire color pixel array data collected by the drone, map the color pixel array data to the HSV space, and extract the two-dimensional luminance matrix of the luminance channel;
[0008] The two-dimensional brightness matrix is subjected to high-frequency and low-frequency decoupling calculations to separate the low-frequency illumination background matrix and the high-frequency reflection feature matrix;
[0009] Extract the dark spot connected regions in the two-dimensional brightness matrix that are below a preset low-bit value threshold, and perform differential evolution analysis based on the gray-scale change characteristics of the boundary pixels of the dark spot connected regions to extract the shadow region data that meets the preset continuous and gradual decay conditions.
[0010] Extract the local lighting background value corresponding to the shadow area data in the low-frequency lighting background matrix, and calculate the dynamic gain multiplier of each pixel coordinate point in the shadow area data based on the brightness ratio between the average brightness value of the global non-shadow area and the local lighting background value.
[0011] The pixel values corresponding to the shadow area data in the two-dimensional brightness matrix are mapped to the dynamic gain multiplier for pixel-by-pixel calculation, and the mapping calculation result is fused with the high-frequency values of the corresponding coordinates in the high-frequency reflection feature matrix to obtain the assimilated brightness matrix.
[0012] The assimilated brightness matrix is merged with the hue data matrix and saturation data matrix separated from the color pixel array data to output reconstructed pixel array data for photovoltaic panel defect identification.
[0013] Secondly, this invention discloses a photovoltaic panel defect detection system based on UAV vision, comprising:
[0014] The image acquisition and brightness decoupling module is used to acquire color pixel array data collected by the UAV, map the color pixel array data to the HSV space, and extract the two-dimensional brightness matrix of the brightness channel.
[0015] The high-frequency and low-frequency feature decoupling module is used to perform high-frequency and low-frequency decoupling calculations on the two-dimensional brightness matrix to separate the low-frequency illumination background matrix and the high-frequency reflection feature matrix.
[0016] The shadow region identification module is used to extract dark spot connected regions in the two-dimensional brightness matrix that are below a preset low-order value threshold, and to perform differential evolution analysis based on the gray-scale change characteristics of the boundary pixels of the dark spot connected regions to extract shadow region data that meets the preset continuous and gradual decay conditions.
[0017] The dynamic gain calculation module is used to extract the local lighting background value corresponding to the shadow area data in the low-frequency lighting background matrix, and calculate the dynamic gain multiplier of each pixel coordinate point in the shadow area data according to the brightness ratio relationship between the average brightness value of the global non-shadow area and the local lighting background value.
[0018] The shadow compensation and feature fusion module is used to perform pixel-by-pixel mapping calculations on the pixel values of the shadow area data in the two-dimensional brightness matrix and the dynamic gain multiplier, and to perform data fusion calculations on the mapping calculation results and the high-frequency values of the corresponding coordinates in the high-frequency reflection feature matrix to obtain the assimilated brightness matrix.
[0019] The image reconstruction output module is used to merge the assimilated brightness matrix with the hue data matrix and saturation data matrix separated from the color pixel array data, and output the reconstructed pixel array data for photovoltaic panel defect identification.
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0021] 1. This invention analyzes the brightness variation characteristics in photovoltaic panel images collected by drones, which can effectively reduce the interference of cloud shadows on the detection results under cloudy weather, avoid misjudging low brightness areas caused by changes in ambient light as defects on the surface of photovoltaic panels, and improve the accuracy of defect detection under complex lighting conditions.
[0022] 2. This invention establishes an adaptive compensation mechanism related to local lighting conditions to achieve targeted correction of shadow areas, avoiding overexposure of non-shadow areas or distortion of image details caused by overall brightness adjustment, thereby improving the stability of image correction effect.
[0023] 3. While eliminating the influence of non-uniform lighting, the present invention can maintain the effective texture features of the photovoltaic panel surface, so that the subtle defect information hidden in the shadow area can be preserved, reducing the problem of defect feature loss caused by shadow processing, and providing a more reliable image data basis for subsequent defect identification. Attached Figure Description
[0024] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts. Wherein:
[0025] Figure 1 This is a flowchart of the method of the present invention;
[0026] Figure 2 This is a data flow diagram of the present invention;
[0027] Figure 3 This is a system architecture diagram of the present invention. Detailed Implementation
[0028] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.
[0029] This invention relates to a photovoltaic panel defect detection method based on UAV vision, belonging to the field of intelligent inspection and visual image processing technology. Addressing the problems of low efficiency in manual inspections after large-scale photovoltaic power plant deployment and the susceptibility of UAV visual inspection to ambient light, this invention proposes a photovoltaic panel defect detection scheme based on image brightness feature analysis and adaptive illumination correction. By separating and processing the brightness information in the images acquired by the UAV, it identifies non-uniform shadow areas caused by cloud cover, and maintains the true texture features of photovoltaic panel defects while eliminating shadow interference, thereby improving the accuracy of photovoltaic panel defect detection under complex weather conditions.
[0030] Current intelligent inspection technologies for photovoltaic panels typically rely on drones equipped with visible light cameras to acquire images of the modules and then analyze abnormal conditions such as cracks, stains, and hot spots using image recognition algorithms. However, in actual inspections, photovoltaic panels are exposed to the outdoor environment for extended periods, and are affected by factors such as cloud movement, changes in solar altitude, and localized shading, easily resulting in large areas of uneven brightness in the acquired images. In particular, cloud shadows formed under cloudy weather conditions often appear as low-grayscale areas, sharing similar visual characteristics with defect areas such as panel contamination and localized abnormal heating. This makes it difficult for traditional methods based on threshold segmentation or ordinary image enhancement to accurately distinguish between changes in ambient light and actual defects. Furthermore, using overall brightness adjustment methods can easily destroy the texture information in the original image, weakening the subtle defect features hidden in shadow areas and affecting subsequent inspection results.
[0031] To address the aforementioned problems, this invention aims to provide a photovoltaic panel defect detection method adaptable to complex lighting environments. By analyzing image brightness variation patterns, it achieves cloud shadow identification and adaptive correction, reducing the impact of non-uniform lighting on the detection process while preserving effective defect information on the panel surface. The method acquires color pixel array data of the photovoltaic panel area using a UAV and maps it to HSV space, extracting a two-dimensional brightness matrix characterizing brightness variations. Based on the brightness matrix, high-frequency and low-frequency features are decoupled to obtain a low-frequency illumination background matrix reflecting ambient light variations and a high-frequency reflection feature matrix reflecting panel texture variations. Furthermore, low-brightness dark spot areas are located, and differential evolution analysis is performed based on the pixel grayscale variation patterns at the dark spot boundaries. The continuously and gradually changing characteristics of cloud shadow boundaries are used to identify shadow area data.
[0032] After identifying the shadow area, this invention obtains the local illumination background value corresponding to the shadow area and, combined with the ratio between the average brightness of the global non-shadow area and the local illumination background, calculates the dynamic gain multiplier corresponding to each pixel position to achieve adaptive brightness compensation for different lighting conditions. The compensated brightness data is further fused with a high-frequency reflection feature matrix to restore the weakened local texture information under the influence of shadows and generate an assimilated brightness matrix. Subsequently, this matrix is recombined with the hue data matrix and saturation data matrix in the original image to output reconstructed pixel array data for photovoltaic panel defect identification.
[0033] Through the above technical solutions, the present invention can effectively reduce the false detection problem caused by the confusion between cloud shadows and real defect areas in cloudy environments, and improve the applicability of UAV inspection images under complex lighting conditions. At the same time, by using a dynamic compensation method based on local lighting background, it avoids image distortion caused by traditional global enhancement and preserves the texture features of potential defects in the shadow area, providing more stable and reliable input data for subsequent intelligent detection models, which helps to improve the efficiency of automated inspection of photovoltaic power plants and the accuracy of defect identification.
[0034] like Figure 1 , Figure 2 As shown, this application discloses a method for detecting defects in photovoltaic panels based on UAV vision, including the following steps:
[0035] A1. Acquire the color pixel array data collected by the drone, map the color pixel array data to the HSV space, and extract the two-dimensional brightness matrix of the brightness channel.
[0036] The color pixel array data collected by the drone is represented in the underlying data structure as a three-dimensional tensor (i.e., an RGB matrix) containing spatial resolution and three color channels: red, green, and blue. It records the reflection intensity of different frequency bands of light waves at each point of the photovoltaic panel in physical space. As the underlying base data for the entire defect detection process, the color pixel array data collected by the drone contains all the optical response information of the photovoltaic panel surface (including defect features, normal panel color, and ambient light information).
[0037] By invoking a color space conversion algorithm, the nonlinear color mixing values of the color pixel array data in the RGB coordinate system are transformed into three mutually orthogonal independent dimensions: hue, saturation, and value. The two-dimensional brightness matrix of the value channel is essentially a slice of the three-dimensional HSV tensor, stripping away the H and S channels that represent color and retaining only the V channel that represents light intensity, thus obtaining a pure grayscale two-dimensional array. The purpose of extracting the two-dimensional brightness matrix of the value channel is that cloud shadows are physically only a decrease in illuminance, without changing the inherent color of photovoltaic glass and solar cells. Using the two-dimensional brightness matrix of the value channel as the sole input for subsequent processing not only reduces the data processing dimension by two-thirds but also completely isolates "light interference" from "color characteristics" from a physical mechanism perspective.
[0038] A2. Perform high-frequency and low-frequency decoupling calculations on the two-dimensional brightness matrix to separate the low-frequency illumination background matrix and the high-frequency reflection feature matrix;
[0039] In the spatial frequency domain, low frequencies represent regions with gradual numerical changes in an image, while high frequencies represent edges with sharp numerical jumps. In photovoltaic scenes, cloud cover and changes in the angle of solar incidence create a light field with an extremely wide and gradual spatial distribution, representing typical low-frequency signals. Conversely, grid lines, microcracks, or real hard stains on a panel exhibit sharp, step-like physical characteristics at their edges, representing typical high-frequency signals. By performing a sliding convolution on the two-dimensional brightness matrix using a preset low-pass filter (such as a Gaussian weighted smoothing operator), all sharp edges are filtered out, resulting in a low-frequency lighting background matrix that represents only the fluctuations in macroscopic ambient light. Subsequently, by subtracting this low-frequency matrix from the original brightness matrix (or performing a logarithmic difference operation), the pure physical texture hidden beneath the light and shadow, i.e., the high-frequency reflection feature matrix, is extracted. We obtained a "lighting background map" (low-frequency lighting background matrix) that can be adjusted at will, while separating it from the "physical lesion" (high-frequency reflection feature matrix) to ensure that when performing strong shadow brightening later, the faint crack features will not be erased due to numerical overflow.
[0040] A3. Extract the dark spot connected regions in the two-dimensional brightness matrix that are below the preset low-order value threshold, and perform differential evolution analysis based on the gray-scale change characteristics of the boundary pixels of the dark spot connected regions to extract the shadow area data that meets the preset continuous and gradual decay conditions.
[0041] A preset low-level numerical threshold characterizes the dynamic critical index of the lower limit of darkness that a healthy photovoltaic panel can tolerate under the current lighting conditions. The dark spot connected region represents the set of all suspected abnormal low-light pixels in the image; it is a binary topological mask. Using the outer contour coordinates of the dark spot connected region and along the normal direction perpendicular to the contour (i.e., extending from the center of the dark spot outwards to the normal area), brightness values are extracted pixel by pixel to form a one-dimensional gradient data sequence. Then, first-order or second-order difference operations are performed on the gradient data sequence. By calculating this difference evolution law, once the sequence characteristics are determined to conform to continuously and slowly decaying, it can be identified as non-physical optical interference and marked as shadow area data. Utilizing the data quantization of the underlying optical morphology, zero-false-detection shadow identification is achieved, providing absolutely accurate target area coordinates for subsequent targeted elimination.
[0042] The basis for the above processing is that: real physical stains, when they meet normal glass, are physical discontinuities, which, when reflected in the gradient sequence, will present a step change within a very short pixel range; while cloud shadows, due to atmospheric diffuse reflection and scattering, as well as the non-physical nature of cloud edges, will inevitably have a relatively wide "penumbra" when projected onto the photovoltaic panel, which, when reflected in the gradient sequence, will present as a gradually decreasing (or increasing) curve spanning dozens of pixels.
[0043] The calibration process for the preset low-order value threshold is as follows:
[0044] Under stable and uniform ambient light conditions, a drone is controlled to acquire sample images of a standard photovoltaic panel array with a known clean surface, free from any physical defects or shading. The acquired standard sample images are mapped to the HSV color space, and the corresponding reference two-dimensional brightness matrix is extracted. A statistical algorithm is used to calculate the global average brightness value of all pixels in this reference two-dimensional brightness matrix, and this value is used as the baseline brightness state for this batch of photovoltaic panels. Finally, a preset dark spot tolerance coefficient (e.g., between 0.60 and 0.75) is introduced, and the baseline brightness state is multiplied by the dark spot tolerance coefficient. The resulting fixed product is then fixed as a preset low-order value threshold.
[0045] A4. Extract the local lighting background value corresponding to the shadow area data in the low-frequency lighting background matrix, and calculate the dynamic gain multiplier of each pixel coordinate point in the shadow area data based on the brightness ratio between the average brightness value of the global non-shadow area and the local lighting background value.
[0046] The local lighting background value represents the extent to which each specific pixel within the shadow area is macroscopically dark (i.e., the background base brightness), while the average brightness value of the global non-shadow area represents the standard illuminance reference benchmark that the photovoltaic panel should have under normal sunlight.
[0047] In terms of specific computational logic, the brightness ratio relationship between the two mentioned above does not assign a uniform compensation constant to the entire shadow area, but rather performs a pixel-by-pixel proportional mapping. Since the center of the cloud shadow is extremely dark and gradually brightens towards the edges, this point-by-point proportional calculation generates a unique dynamic gain multiplier for each coordinate point (for example, the multiplier calculated for the extremely dark central area may be as high as 3.5, while the multiplier for the penumbra near the edge may smoothly transition to 1.2). This constructs a nonlinear gain surface that is completely inverted from the original shadow attenuation surface, achieving micro-adaptive adjustment by supplementing light where it is lacking and by the amount of light missing.
[0048] A5. Perform pixel-by-pixel mapping calculations on the pixel values of the corresponding shadow area data in the two-dimensional brightness matrix and the dynamic gain multiplier, and perform data fusion calculations on the mapping calculation results and the high-frequency values of the corresponding coordinates in the high-frequency reflection feature matrix to obtain the assimilated brightness matrix.
[0049] The mapping calculation result is a local two-dimensional numerical array, representing the macroscopic lighting substrate or ideal exposure background that the shadow area should present, assuming the photovoltaic panel is not obstructed by any clouds, after stripping away all micro-textures (high-frequency features). This mapping calculation result is then fused with the corresponding high-frequency values. In the specific execution logic, high-frequency values are extracted using spatial pixel coordinates as anchor points (these values have been safely isolated in step A2 and are not amplified or corrupted by the gain multiplier). The remaining space between the current mapping calculation result and the absolute brightness upper limit (e.g., grayscale value 255) is pre-assessed, and then the extracted high-frequency values are dynamically scaled using this remaining space as an upper limit constraint. Finally, the scaled high-frequency values are superimposed on the mapping calculation result to complete the feature interweaving and fusion, resulting in the assimilated brightness matrix.
[0050] The assimilated brightness matrix of the fusion output is a complete single-channel grayscale map covering the entire photovoltaic array. It represents an idealized brightness map that is completely assimilated and leveled in terms of macroscopic illuminance, and in terms of microscopic high-frequency structures such as physical grid lines and minute hidden cracks, it is not subject to any overflow damage. As the output of the entire shadow elimination, it completely eliminates the false anomalies caused by the meteorological environment from the pure optical brightness dimension.
[0051] A6. Merge the assimilated brightness matrix with the hue data matrix and saturation data matrix separated from the color pixel array data to output reconstructed pixel array data for photovoltaic panel defect identification.
[0052] Using the two-dimensional spatial coordinates of pixels as a reference, the repaired assimilated brightness matrix is used as a new lightness (V) channel data. This data is then aligned and stacked at the channel level with the hue data matrix (H channel) and saturation data matrix (S channel) that were extracted and preserved intact in step A1, reconstructing a complete three-dimensional HSV space tensor. Subsequently, a preset color space inverse mapping algorithm is called to reverse-calculate this three-dimensional HSV tensor into a pixel array in the red-green-blue (RGB) color space, i.e., reconstructing the pixel array data. The reconstructed pixel array data is a standard three-channel color image matrix in terms of data structure, and physically represented as a high-definition real-world image of a photovoltaic panel that has had cloud cover removed in the virtual data space by the algorithm, while retaining its true physical color and texture.
[0053] This application further discloses the process of performing high-frequency and low-frequency decoupling calculations on the two-dimensional brightness matrix in step A2, as follows:
[0054] B1. Obtain the Gaussian weighted operator with a preset kernel size;
[0055] The Gaussian weighted operator is essentially a spatial low-pass filter with isotropic characteristics. The preset kernel size of the Gaussian weighted operator is determined in advance based on the ground sampling distance (GSD) during UAV inspection and the minimum physical transition width of cloud shadows. By matching the physical scale of the shadow edges, it ensures that the filter can smooth out sharp grid lines and micro-cracks on the panel in subsequent calculations, while accurately preserving the illumination fluctuation contours of macroscopic cloud shadows, providing a precise mathematical scale for decoupling.
[0056] B2. Perform convolution smoothing calculation on the two-dimensional brightness matrix and the Gaussian weighted operator to generate a low-frequency illumination background matrix;
[0057] Using the coordinates of each pixel in the two-dimensional brightness matrix Using the central anchor point, map a region of size [size missing] within the image space. A preset neighborhood window is then defined. Subsequently, a Gaussian weighted operator is invoked. This Gaussian weighted operator is a weight matrix of the same size as the window, whose three-dimensional distribution of weight values exhibits a two-dimensional Gaussian distribution characteristic of "highest at the center, with a bell-shaped non-linear decay towards the edges." During computation, a sliding window operation is performed: the Gaussian weighted operator is overlaid on the current neighborhood window, and the brightness value of each actual pixel within the window is multiplied one by one with its corresponding Gaussian weight. All products are then summed and divided by the total weights to ensure energy normalization. The final result is used as the central anchor point. The low-frequency illumination values are obtained; the sliding calculation is completed by traversing the entire two-dimensional brightness matrix to generate a complete low-frequency illumination background matrix.
[0058] The resulting low-frequency lighting background matrix is equivalent to a pure light and shadow base map with all physical structural details of the photovoltaic panels removed, leaving only the ambient light gradient surface. This allows the macroscopic meteorological lighting conditions to be independently extracted from the complex mixed image, providing the subsequent shadow compensation algorithm with an extremely smooth reference surface unaffected by local defects.
[0059] B3. Perform a logarithmic difference operation between the pixel values in the two-dimensional brightness matrix and the pixel values at the corresponding coordinates in the low-frequency illumination background matrix to generate a high-frequency reflection feature matrix.
[0060] For the target pixel values in the two-dimensional brightness matrix Calculate the natural logarithm to obtain Simultaneously, the background values at the corresponding coordinates in the low-frequency lighting background matrix... Calculate the natural logarithm to obtain .
[0061] Finally, subtract the logarithms of the two directly, that is, calculate... The generated result is used as the high-frequency value of the corresponding coordinate, and the high-frequency reflection feature matrix is constructed by traversing the entire image.
[0062] The high-frequency reflection feature matrix output by this operation represents all sharp physical abrupt changes on the photovoltaic panel (such as silver grid lines, hidden cracks, and hard stain edges). It achieves absolute decoupling between microscopic physical texture and macroscopic light intensity, ensuring that extremely subtle defect features (high-frequency data) are completely and faithfully preserved. No matter how nonlinearly and drastically the environmental shadows (low-frequency data) are subsequently amplified or compressed, these high-frequency features representing real physical lesions will not suffer any data overflow or obliteration, laying a solid data foundation for the final high-confidence flaw detection and identification.
[0063] Regarding the extraction process of the shaded area data mentioned in step A3, this application further discloses the following:
[0064] C1. Obtain the set of boundary pixel coordinates of the dark spot connected region, and use the coordinate points in the boundary pixel coordinate set as reference points to extract the brightness values of the corresponding coordinates along the set normal direction to construct the boundary gradient evolution data sequence.
[0065] The set of boundary pixel coordinates of the dark spot connected region represents the physical boundary between the suspected abnormal region (dark spot connected region) and the normal background region. The geometric normal vector of each pixel on the physical boundary is calculated, and the brightness values of several consecutive pixels are read sequentially along the normal vector (i.e., the direction that radiates outward perpendicular to the edge of the dark spot). These values are arranged into a one-dimensional data array to obtain the boundary gradient evolution data sequence.
[0066] C2. Perform first-order numerical difference calculation on the boundary gradient evolution data sequence to generate difference change distribution data;
[0067] By calculating the difference between the brightness values of adjacent pixels in the boundary gradient evolution data sequence, the interference of absolute illumination intensity is completely eliminated. Regardless of whether the current panel is under strong midday light or weak morning light, the first-order difference data only reflects the drastic degree of brightness change, ensuring that the evaluation criteria of the algorithm remain absolutely consistent under various lighting conditions.
[0068] C3. The length of the pixel interval where the first-order difference value is continuously greater than the preset gradient threshold in the statistical difference change distribution data.
[0069] In the real physical scenario of photovoltaic panels, mud clods or broken edges represent solid faults, and their brightness changes are extremely steep in space (i.e., step signals), with the interval of continuous brightness exceeding the threshold typically only one to two pixels. In contrast, the shadows cast by clouds, due to atmospheric diffuse reflection, inevitably have a wider "penumbra transition zone," where brightness changes are gradually stretched. Therefore, the statistically calculated pixel interval length data is physically equivalent to the edge blur width of this abnormal region.
[0070] Before deployment, the preset gradient threshold is calibrated offline as follows:
[0071] Under uniform diffuse illumination, the drone is controlled to sample a standard photovoltaic panel area that is free of defects and shadows to obtain a reference brightness matrix.
[0072] Within the flat base region of the reference brightness matrix, multiple sets of adjacent pixel sequences in the horizontal and vertical directions are randomly extracted, and the absolute value of the first-order difference of the brightness values of adjacent pixels is calculated to construct the background noise difference set.
[0073] Statistical analysis was performed on the background noise difference set to calculate the standard deviation of the noise difference in the set;
[0074] Finally, based on statistical criteria, a preset multiple of the standard deviation data (e.g., 3 times the standard deviation) is taken and solidified as the preset gradient threshold.
[0075] C4. If the length of the pixel interval data is greater than the preset continuous gradual change length threshold, and the first-order difference value shows a monotonically decreasing trend within the pixel interval, then the boundary gradient evolution data sequence is determined to meet the preset continuous gradual change decay condition, and the corresponding dark spot connected region is marked as shadow area data.
[0076] The above judgment process includes two strict data control conditions:
[0077] First, the fact that "the interval length is greater than the threshold" proves that the edge has obvious wide-range blurred transition characteristics, thus ruling out sharp solid stains.
[0078] Second, the fact that "the difference values show a monotonically decreasing trend" proves that this transition is a smooth transition that conforms to the natural attenuation law of optical diffuse reflection, eliminating random fluctuations caused by multiple small dirt particles at the edge.
[0079] This judgment process relies entirely on the evolutionary characteristics of underlying optical data, achieving deterministic classification and characterization of cloud shadows. It provides absolutely reliable target area coordinates for subsequent dynamic compensation, ensuring that only meteorological shadows are brightened and eliminated, and that genuine physical flaws are never mistakenly smoothed out.
[0080] Regarding the construction process of the boundary gradient evolution data sequence mentioned in step C1, this application further discloses the following:
[0081] C11. Calculate the curvature tangent vector of the reference point in the boundary pixel coordinate set, and obtain the normal vector orthogonal to the curvature tangent vector;
[0082] At the specific mathematical execution level, the coordinates of the reference point and several boundary points in its neighborhood are extracted. Using curve fitting or polynomial differentiation algorithms, the curvature tangent vector representing the local edge orientation of the point is calculated. Subsequently, through vector rotation or algebraic geometric constraints with a dot product of zero, a normal vector strictly orthogonal to this curvature tangent vector is obtained.
[0083] In optical imaging physics, the maximum gray-level gradient at the boundary between light and dark (i.e., the direction of the most drastic change in brightness) must be perpendicular to the edge direction. By mathematically locking this orthogonal normal vector, the artificial stretching of the transition zone caused by the skew angle between the sampling path and the edge is completely eliminated, ensuring that the acquired brightness profile data can truly and in its original state reflect the absolute physical sharpness of the edge of the abnormal area.
[0084] C12. According to the preset step size pixel distance, extend along the normal vector to the outside of the dark spot connected region to the preset extension length, and obtain the brightness value of each coordinate point on the extension path in the two-dimensional brightness matrix.
[0085] The preset step size pixel distance (e.g., set to 1 pixel unit) ensures the continuity and uniformity of spatial sampling, avoiding high-frequency signal aliasing or feature omission caused by skip sampling; the forced extension to the outside of the dark spot connected region physically stipulates that the data flow must cross the boundary from the "suspected abnormal dark area" to the "normal exposure bright area", ensuring that the brightness evolution acquired subsequently is always under the same reference polarity (from dark to bright) observation perspective; the preset extension length (e.g., extending outward by 15 to 20 pixels) sets a hard data boundary for single line-finding sampling, avoiding the algorithm from performing ineffective computational roaming in the vast normal panel area, and strictly concentrating resources within the penumbra transition area or solid fault area that is most valuable for classification and qualitative analysis.
[0086] C13. Arrange the brightness values in order of distance along the extension path to generate a boundary gradient evolution data sequence.
[0087] The discrete pixel brightness data in the two-dimensional coordinate system are sequentially loaded into a one-dimensional data array according to their spatial Euclidean distance from the reference point, ultimately obtaining the boundary gradient evolution data sequence. This step successfully reduces the dimension of a complex two-dimensional spatial edge morphology recognition problem to a standard one-dimensional digital signal processing problem (i.e., time series analysis of univariate evolution with distance).
[0088] The calculation process for the dynamic gain multiplier mentioned in step A4 is further disclosed in this application as follows:
[0089] D1. Extract all pixel values in the non-shaded areas of the two-dimensional brightness matrix and generate the average brightness value by arithmetically averaging.
[0090] The average brightness value is a scalar quantity that physically represents the objective average illuminance of a photovoltaic panel that is not obstructed by clouds and receives normal sunlight under current weather conditions and the current drone shooting perspective. Whether it is the dim light of dawn or dusk or the strong light of midday, this average brightness value can provide an absolutely safe and accurate target for brightening the panel in the current physical environment.
[0091] D2. Extract the relative magnitude features between the average brightness value and the local illumination background value of the corresponding pixel coordinate point, and perform numerical calculation through a preset proportional mapping algorithm to generate the basic mapping base.
[0092] pixel coordinates Using units, the relative relationship between the local actual under-illuminance and the global ideal target illuminance is quantitatively extracted; a preset proportional mapping algorithm (such as logarithmic ratio or direct quotient calculation) can calculate the degree of deficit in macroscopic illumination at this coordinate point. The output base mapping cardinality represents the initial momentum required to flatten the current shadow pixel to the global reference; the mapping cardinality is large at the extremely dark center of the shadow and small at the penumbra at the edge of the shadow, thus constructing a reverse compensation potential energy surface that perfectly matches the shadow attenuation surface on a macroscopic level.
[0093] D3. Using the pixel coordinates to be calculated as the center, extract the local gray-level variance of the two-dimensional brightness matrix within the neighborhood window of the preset pixel size.
[0094] Local grayscale variance is a statistical indicator that measures the dispersion of pixel values within a region. The preset pixel size can be set to 5 pixel units. If a neighborhood window contains silver main grid lines, hidden cracks, or dust edges, its pixel values will jump drastically, and the variance value will be extremely large; conversely, if the window only contains a pure, flat, dark silicon wafer background, the variance value will be extremely small.
[0095] D4. Substitute the local gray-level variance into the preset mapping attenuation function to calculate the adaptive adjustment index that is negatively correlated with the local gray-level variance.
[0096] By using a preset decay function (such as the Gaussian inversion function or the inverse proportional smoothing function), the local gray-level variance is mapped to an adaptive adjustment index.
[0097] When the local grayscale variance is extremely large (indicating the presence of extremely fragile and important grid lines or crack details), the output adaptive adjustment index will approach the lower limit (e.g., approaching 1.0 or less).
[0098] When the local gray variance is extremely small (indicating that the area is a pure, flat shadow with no preservation value), the output exponent will increase significantly.
[0099] D5. Using the base mapping radix as the base and the adaptive adjustment exponent as the exponent, perform exponentiation to generate the dynamic gain multiplier for the corresponding pixel coordinate point.
[0100] For flat background areas in shadow (small local grayscale variance and large adaptive adjustment exponent), the exponentiation operation will geometrically amplify the efficiency of the base mapping cardinality, instantly filling the dark pits with extremely strong gain and completely eliminating the visual presence of the shadow.
[0101] For grid lines or hidden crack areas in shadows (with large local gray-level variance and small adaptive adjustment exponent), the exponent part of the power operation will produce a strong nonlinear convergence effect, forcibly suppressing the magnification of the base mapping, so that these relatively bright micro-structures are weakened during the gain process and will not exceed the upper limit of the camera's brightness response (white truncation).
[0102] Regarding the preset mapping decay function mentioned in step D4, a mapping decay function based on negative exponential asymptotic convergence constraint is introduced, and its specific formula is expressed as follows:
[0103] ;
[0104] in:
[0105] This represents the calculated adaptive adjustment index.
[0106] The base mapping lower bound (usually 1.0) represents the most conservative strategy of the system, which means that no matter the gain, the base remains at least one power of itself to ensure that the original features of the image are not compressed inversely.
[0107] This represents the preset gain release level, which determines the maximum exponential gain space that the system is allowed to release in the ideal flat shadow area. If the value is too small, the shadows will not be completely filled; if the value is too large, it may cause the background to be lifted to the overexposed edge; the value range is 0.5 to 1.5.
[0108] This represents the extracted local grayscale variance.
[0109] The structural sensitivity decay constant is a calibration coefficient used to control the slope of the exponential decay curve. Its value determines the system's sensitivity to texture complexity. In an 8-bit grayscale image, the background noise variance of a flat shadow area is usually below 10, while the local grayscale variance of silver grid lines or obvious hidden crack edges usually soars to over 300. Therefore, the value range of the structural sensitivity decay constant is 50 to 200.
[0110] When the local grayscale variance When it is at its maximum, the formula in The term will rapidly approach infinitely close to At this point, the adaptive adjustment index... It converges to the lower bound of the fundamental mapping. (i.e., 1.0). Physically, this means that when faced with extremely important texture structures, the system will automatically apply the brakes, reducing the exponentiation operation to a linear first-order operation, thus eliminating the possibility of high-frequency structures being overexposed and burned from the underlying algorithm level.
[0111] When the local grayscale variance When the value is extremely small, the formula in The item will approach .at this time, It will reach its maximum value. This means increasing the brightness of the area to the largest possible exponent, instantly filling in the shadow depressions.
[0112] The negative exponential decay function provides an extremely smooth curve. As the variance changes continuously, the increase or decrease of the exponent is a seamless, continuous function, which avoids the step-like brightness banding (color banding effect) that might occur in the image if a piecewise function were used.
[0113] In one specific embodiment:
[0114] Preferred The value is 0.8. This is used in conjunction with a value set to 1.0. This means that in extremely dark areas with no texture, a maximum power of 1.8 will be allowed to be assigned. In machine computation, this value can precisely flatten deep shadows where the illuminance drops to 30% below the normal level to a visual state consistent with the global mean in one non-linear fashion, while retaining a safety margin of about 15% of the upper limit of brightness to prevent data overflow.
[0115] Preferred The value is 120. This is used when a local scan reaches the raster lines (e.g., when extracting local grayscale variance). Substitute into the formula to calculate the attenuation term. At this point, the gain term is almost zero, and the adaptive adjustment exponent strongly converges to near the lower limit of 1.0, perfectly locking in and protecting the high-frequency physical characteristics. Conversely, when scanning a purely shadowed region (e.g., the background variance), ), calculate the attenuation term Smoothly releases over 90% of the... The gain amplitude enables powerful brightness assimilation.
[0116] Regarding the process of generating the basic mapping cardinality mentioned in step D2, this application further discloses the following:
[0117] D21. Calculate the initial illuminance quotient of the average luminance value relative to the local lighting background value, and use the initial illuminance quotient as a relative magnitude characteristic.
[0118] The initial illuminance quotient is obtained by dividing the average luminance value, which represents the global ideal exposure benchmark, by the local illumination background value, which represents the actual dark state of the current pixel. The relative magnitude characteristic characterizes the theoretical linear magnification factor required to directly increase the current shadow pixel to the global average luminance.
[0119] D22. Obtain the mapping truncation threshold that matches the preset image noise tolerance coefficient, and compare the initial illumination quotient with the mapping truncation threshold to execute the proportional mapping algorithm:
[0120] The preset image noise tolerance coefficient is based on the pre-calibrated hardware attribute data of the current drone camera's ISO sensitivity and signal-to-noise ratio (SNR). A mapping cutoff threshold is mapped inversely through the preset image noise tolerance coefficient. The mapping cutoff threshold serves as the critical line between safe brightening and noise detonation, allowing subsequent processing to switch different data processing branches based on whether the illuminance quotient of the current pixel exceeds the limit, thereby achieving a perfect balance between brightening shadows and suppressing noise.
[0121] The calibration process for the preset image noise tolerance coefficient is as follows:
[0122] The system reads the current hardware configuration status of the drone camera, mainly including the current ISO sensitivity level and the corresponding nominal signal-to-noise ratio (SNR) curve. In a laboratory or standard dark body environment, the camera is controlled to acquire a set of dark-background frame images at the same ISO level as the inspection task, and the average background noise standard deviation at that ISO level is calculated. Combining the dynamic range of the normal background grayscale of the photovoltaic panel, a system-preset safety tolerance factor (e.g., between 0.05 and 0.15) is introduced, and the above standard deviation is multiplied by the tolerance factor. The resulting critical noise power ratio is then fixed as the preset image noise tolerance coefficient.
[0123] The mapping truncation threshold represents the critical line in the process of brightening the entire image. When the initial illuminance quotient of a pixel (i.e., the theoretical magnification factor) does not exceed this threshold, it indicates that the area is in a safe penumbra transition zone and can be normally magnified linearly without loss. However, once the threshold is exceeded, it indicates that the area has penetrated into the core shadow region, and continuing to magnify it at the original ratio will inevitably trigger a geometric avalanche of background noise. Its calibration process is as follows:
[0124] First, the preset image noise tolerance coefficient obtained from the above calibration is acquired, and the average brightness reference of the global non-shadow area in the current two-dimensional brightness matrix is extracted. Then, a preset threshold calculation function is called, and the preset image noise tolerance coefficient is inversely proportional to the global average brightness reference, constrained by the camera's inherent signal-to-noise ratio limit. After normalization and cropping using a dynamic formula, a specific value is finally calculated, which is then established as the mapping truncation threshold for the current image. For example, in a typical 8-bit grayscale imaging system, this threshold is usually dynamically constrained and calculated within an absolute magnification range of 2.5 to 4.0.
[0125] D23. Under the condition that the initial illuminance quotient is less than or equal to the mapping cutoff threshold, the initial illuminance quotient is output as the base mapping base.
[0126] This processing branch corresponds to pixels on the photovoltaic panel located in the penumbra or lightly shaded areas. Although the brightness in these areas is reduced, it does not reach the sensor's signal-to-noise ratio limit. The initial illuminance quotient is directly output as the base mapping value (i.e., used directly without any attenuation), preserving the original linear contrast in normal shadow areas to the maximum extent. This lossless proportional mapping ensures that the surface texture of the photovoltaic panel under light shadows still maintains an absolutely true physical grayscale level after brightening, avoiding distortion caused by unnecessary algorithmic intervention.
[0127] D24. Under the condition that the initial illuminance quotient is greater than the mapping cutoff threshold, calculate the overflow difference between the initial illuminance quotient and the mapping cutoff threshold; substitute the overflow difference into the preset logarithmic compression function to perform nonlinear attenuation calculation and generate an attenuation compensation value; add the mapping cutoff threshold and the attenuation compensation value to generate the basic mapping base.
[0128] When encountering a deep core shadow, the system enters the second logical branch. At this point, if a hard truncation is used (i.e., forcing all instances exceeding the threshold to equal the actual value), the deep shadow area will become a solid color block with no gradient after brightening, erasing any potential hidden cracks deep within the shadow. Therefore, at the mathematical execution level, subtraction is first performed to obtain the overflow difference exceeding the safety line (…). ), then Substitute it as an independent variable into the logarithmic compression function (e.g., similar to...) (The logarithmic variant model). It neither crudely discards the gradient information of the excess portion as in a hard truncation, nor allows it to be linearly amplified, leading to runaway noise.
[0129] The mathematical properties of logarithmic functions—monotonically increasing but with a continuously decreasing slope—ensure that the difference in the overflow portion is greatly compressed, thus strongly suppressing the bursts of high-frequency noise. Simultaneously, the monotonically increasing characteristic ensures that even after brightening, the pixels in the deepest shadows remain slightly darker than the pixels in the next deepest shadows. This technique, which preserves a slight relative gradient difference, maintains the physical topology of the deep shadow region, providing data clues for subsequent identification of hidden defect features.
[0130] Finally, the mapping truncation threshold, which served as a safety baseline, was reassembled with the attenuation compensation value, which had been extremely compressed but retained gradient information. The generated base mapping not only achieved a continuous and smoothly transitioning nonlinear mapping curve in terms of numerical form, but also achieved an extremely powerful algorithmic goal in terms of physical effect: now we have an ideal brightening base that can flatten all shadows without any blind spots, absolutely suppress noise snowflakes, and perfectly retain all micro-brightness gradients, laying the data foundation for the next step of combining micro-variance for exponentiation.
[0131] Regarding the preset logarithmic compression function mentioned in step D24, in actual embodiments, a nonlinear decay model based on bounded saturated logarithmic compression can be selected, and its specific mathematical formula is as follows:
[0132] ;
[0133] in:
[0134] This represents the calculated attenuation compensation value.
[0135] This represents the overflow difference of the input (i.e., when the initial illuminance quotient is...). Exceeding the mapping truncation threshold The portion exceeding the time limit, ).
[0136] This represents the preset upper limit coefficient for logarithmic compression saturation gain, which strictly limits the gain when the shadow is extremely deep ( When ), the absolute peak boundary that the attenuation compensation value can reach.
[0137] This represents the logarithmic curve shape adjustment constant. This parameter controls the rising slope and curvature of the logarithmic function during the initial overflow phase.
[0138] Example of preferred numerical values for engineering applications (applicable to 8-bit grayscale images):
[0139] Preferred The value ranges from 1.2 to 1.8 (e.g., 1.5).
[0140] Preferred The value can be between 2.0 and 5.0 (e.g., 3.0).
[0141] This combination of parameters ensures that when dealing with extremely dark center core shadows, the logarithmic compression curve can transition smoothly without causing the compensation value to expand indefinitely.
[0142] The first derivative of the logarithmic function is With the overflow difference As the value increases, the derivative decreases strictly inversely. This means that when the overflow is just beginning, rapid compensatory growth is allowed; however, as the shadow deepens... As the value increases, the rate of increase of the compensation value becomes slower and slower (i.e., it exhibits asymptotic saturation characteristics). This physical property completely suppresses the geometric progression of the background noise.
[0143] Although the logarithmic function strongly compresses large values, due to its monotonically increasing mathematical nature, it will never forcibly flatten all out-of-limit pixels to a fixed constant like threshold truncation. Even after logarithmic compression, the pixels in the deepest shadows still receive a slight additional compensation value compared to the next deepest pixels. This preserves the extremely weak relative brightness gradient within the core shadow area at the data's underlying layer, ensuring that deep structures do not become rigid, solid color blocks after brightening.
[0144] Because of the adoption The composite structure, when When the result is exactly at the cutoff threshold boundary, the calculation result is... This achieves a completely seamless connection with the equivalent output area of the previous step, and will not produce a step break during execution.
[0145] Regarding the process of obtaining the assimilation brightness matrix mentioned in step A5, this application further discloses the following:
[0146] E1. Extract a neighborhood window of a preset size centered on the corresponding coordinate point in the high-frequency reflection feature matrix, and calculate the two-dimensional gradient vector of the high-frequency values within the neighborhood window of the preset size.
[0147] High-frequency pixels to be processed in the high-frequency reflection feature matrix Using a spatial anchor point, expand equidistantly in all directions, and intercept a... A two-dimensional submatrix is used as the neighborhood window. The preset size is typically calibrated based on the pixel-level physical width of minute cracks or grid lines on the photovoltaic panel; in practical engineering, it is preferably... or The pixel size.
[0148] After obtaining the neighborhood window of the preset size, a discrete differential operator (such as the Sobel operator or the Scharr operator) is called to perform spatial convolution operations on the high-frequency values within the window along the horizontal (X-axis) and vertical (Y-axis) directions of the image, respectively, to calculate the horizontal partial derivatives. with vertical partial derivative This merges the two-dimensional gradient vectors that constitute the central pixel. .
[0149] The obtained two-dimensional gradient vectors characterize the steepest direction and rate of change of high-frequency brightness variations within a local region. By observing the topological evolution of the two-dimensional gradient vectors, we can determine whether a point lies on a continuous physical edge, providing indispensable vector source data for subsequent structural confidence assessment.
[0150] E2. Extract the maximum principal direction gradient magnitude and the orthogonal direction gradient magnitude perpendicular to the maximum principal direction from the two-dimensional gradient vector.
[0151] Using tensor analysis or eigenvalue decomposition algorithms (such as constructing the gradient covariance matrix and solving for eigenvalues), the gradient magnitude of the most drastically changing principal direction (i.e., the tangential direction perpendicular to the physical edge) and the orthogonal gradient magnitude along the direction extending from the physical edge itself are extracted from the two-dimensional vector field.
[0152] These two sets of mutually orthogonal gradient magnitudes physically characterize the anisotropy of photovoltaic surface features: real grid lines or hidden cracks are typical linear structures, which inevitably have drastic gray-scale fluctuations in the main direction (maximum gradient magnitude in the main direction is extremely large), while the gray-scale is relatively stable in the orthogonal extension direction (gradient magnitude in the orthogonal direction is extremely small).
[0153] E3. Calculate the ratio of the maximum principal direction gradient magnitude to the orthogonal direction gradient magnitude to generate the structural confidence coefficient;
[0154] By performing a simple division operation, the gradient magnitude in the maximum principal direction is divided by the gradient magnitude in the orthogonal direction to obtain a dimensionless relative quotient. The resulting structural confidence coefficient directly characterizes the probability or purity that the current high-frequency feature belongs to a real physical structure. If the ratio is much greater than 1, it indicates that the point is a real crack or grid line; if the ratio approaches 1, it indicates that the principal direction and the orthogonal direction change in the same way, and the point must be a disordered noise point.
[0155] E4. Perform a weighted correction operation on the structural confidence coefficient and the high-frequency values of the corresponding coordinates to generate corrected high-frequency feature values;
[0156] Using the structural confidence coefficient as an independent dynamic weighting factor, the amplitude of the original high-frequency values is targeted for suppression or scaling. For coordinate points with low structural confidence coefficients (i.e., geometrically isolated and divergent noise points), a minimal attenuation weight close to zero is assigned to them to strongly suppress their high-frequency amplitude. For coordinate points with high confidence (i.e., geometrically continuous and linear realistic texture), a basic retention weight close to 1 or an amplification weight with positive excitation is assigned to them.
[0157] The obtained corrected high-frequency eigenvalues physically represent a pure textured film that has been thoroughly targeted and purified. In this set of high-frequency data, the unstructured high-frequency background noise caused by the dark current of the drone camera or the scattered reflection of the environment has been strongly filtered out by the algorithm (i.e. the value is corrected to 0 or a minimum value), leaving only effective peaks that represent real physical lesions (such as hidden cracks) or inherent device structures (such as silver grid lines).
[0158] E5. Obtain the preset brightness saturation extreme value, calculate the numerical difference between the brightness saturation extreme value and the corresponding mapping calculation result, and generate the available space redundancy value.
[0159] The brightness saturation extreme value is a fixed system parameter (constantly 255 in an 8-bit grayscale image). The difference between 255 and the brightened mapping result of the current coordinate point is the available space redundancy value. The available space redundancy value physically represents the safe fill space left between the current pixel and the overexposed white area.
[0160] E6. Based on the available spatial redundancy value, the modified high-frequency characteristic value is nonlinearly scaled to generate an adaptive high-frequency fusion component.
[0161] A preset nonlinear mapping function (such as an exponential convergence curve based on available spatial redundancy) is invoked to dynamically compress the modified high-frequency feature values to be superimposed. If the available redundancy is large, the high-frequency features maintain their original amplitude output; if the available redundancy is extremely small, the amplitude of the high-frequency features will be forcibly nonlinearly compressed. The adaptive high-frequency fusion component represents the optimal texture increment that can be losslessly embedded into the current lighting environment after safe adaptation.
[0162] E7. The mapping calculation result is summed with the adaptive high-frequency fusion component to generate the assimilated brightness value of the corresponding coordinate point, and all pixel coordinate points are combined to form the assimilated brightness matrix.
[0163] The mapping calculation result (low-frequency substrate) representing macroscopic uniform illuminance and the adaptive high-frequency fusion component representing microscopic physical structure are merged by pure pixel-level addition in the same coordinate system. The entire two-dimensional matrix is then reorganized through loop traversal to obtain the assimilated brightness matrix. The final assimilated brightness matrix is the data crystallization of the entire illumination decoupling and shadow compensation algorithm. It represents an idealized photovoltaic array brightness map that perfectly eliminates weather obstruction depressions in macroscopic light and shadow and achieves absolute structural fidelity in microscopic texture.
[0164] Regarding the process of nonlinear amplitude scaling of the corrected high-frequency eigenvalues mentioned in step E6, this application further discloses:
[0165] ;
[0166] in:
[0167] The calculated adaptive high-frequency fusion components;
[0168] The corrected high-frequency eigenvalues calculated in the preceding steps (i.e., the pure texture amplitudes after structural confidence-weighted cleaning).
[0169] Redundancy value of available space (i.e.) ,in For example, a brightness saturation extreme value such as 255. (The result of the mapping calculation / the brightened low-frequency background).
[0170] This is the redundancy suppression damping coefficient (used to control the decay rate when the high-frequency characteristics converge to the saturation limit).
[0171] To prevent zero overflow, the minimum constant (e.g., take...) (), used to prevent arithmetic singularities caused by a denominator of zero.
[0172] When the low-frequency background is brightened Extremely close to the extreme value of brightness saturation At that time, spatial redundancy values can be used. According to the Taylor series expansion, when hour, ;Will Substituting into the original equation, we obtain the limiting approximation with minimal redundancy:
[0173] ;
[0174] At this point, the final assimilated brightness value after superposition is:
[0175] ;
[0176] As long as the damping coefficient Set to a constant greater than 1.0 (e.g., ),but This means that regardless of the original high-frequency features How intense, the final assimilated brightness value after superposition. It has been rigorously proven mathematically that it is always less than the extreme value of lightness saturation. This fundamentally prevents texture loss caused by saturation truncation.
[0177] When the low-frequency background is dark and the available space redundancy is extremely abundant (i.e.) In the exponential term, the numerator is much larger than the denominator, resulting in an exponential decay term. .
[0178] The formula then degenerates into:
[0179] ;
[0180] Within the safe range, the scaling factor will be automatically reduced to 1.0, achieving 100% lossless original weaving of high-frequency physical textures, preserving the original contrast and sharpness of hidden cracks.
[0181] The entire exponential envelope function in The function is continuously differentiable throughout the interval, eliminating gradient jumps at critical points of the piecewise function and ensuring that the recombined color pixel array does not produce visible stair-shaped block artifacts.
[0182] Redundant suppression damping coefficient The value ranges from 1.2 to 2.0, and in a specific embodiment, it is preferred to... .
[0183] Example of physical scene deduction (using an 8-bit grayscale image, brightness and saturation extrema) (For example)
[0184] Scenario 1: Safe Zone , , );
[0185] Substituting into the formula and solving: the exponent term is:
[0186] .
[0187] Adaptive high-frequency fusion components .
[0188] With ample redundancy, high-frequency textures are almost lossless (retaining 97% of the amplitude), resulting in the following final brightness:
[0189] .
[0190] Scenario 2: Extremely High-Brightness Critical Zone ( , , );
[0191] If you add them directly without scaling: This will result in severe overexposure and truncation, destroying all high-frequency details.
[0192] Substituting into this formula, the exponent term is:
[0193] .
[0194] Adaptive fusion components .
[0195] High-frequency textures are gently compressed to Final brightness:
[0196] The high-frequency texture is securely embedded within the remaining 10 grayscale spaces, without exceeding the limits, while retaining subtle but crucial gradient abrupt changes.
[0197] This application further discloses the weighted correction operation process for correcting high-frequency eigenvalues in step E4, as follows:
[0198] E41. Obtain the preset structural response control threshold, and perform a difference calculation between the structural confidence coefficient and the structural response control threshold to generate structural significance overflow data.
[0199] The structural response control threshold is a pre-calibrated benchmark constant based on the current typical texture complexity of photovoltaic panels. It represents the minimum confidence level at which the machine mathematically recognizes a local high-frequency change as sufficiently similar to a physical crack or grid line. Subtracting this structural response control threshold from the structural confidence coefficient calculated in the preceding step E3 generates the structural saliency overflow data. The structural saliency overflow data serves as a physical state indicator with positive and negative polarities; when a local pixel is a random isolated noise point, its structural confidence coefficient is extremely low, and the resulting structural saliency overflow data after subtracting the structural response control threshold is negative; conversely, when a local pixel is located on a real grid line or hidden crack, its structural confidence coefficient is extremely high, and the resulting structural saliency overflow data is positive.
[0200] The calibration process for the structural response control threshold is as follows:
[0201] Under normal lighting conditions, a drone is controlled to sample the background area of a standard photovoltaic panel silicon wafer with a known clean surface, free of any physical defects and exposed grid lines, to obtain a defect-free substrate image. Then, following the aforementioned high-low frequency decoupling and two-dimensional gradient calculation logic, the structural confidence coefficient (i.e., the ratio of the gradient magnitude of the maximum principal direction to the orthogonal direction) of each pixel in the defect-free substrate image is calculated, thereby constructing a background structural noise sample set. Since there is no true linear structure in this region, the confidence coefficients in this sample set will exhibit a normal distribution and their values will generally approach 1.0. Next, statistical analysis is performed on the background structural noise sample set to calculate the mean and standard deviation of the structural confidence coefficients within the sample set. Finally, based on the confidence interval criterion in statistics, a preset strict control factor (e.g., a constant value between 3 and 5) is introduced, and the sum of the mean and the standard deviation (the product of the standard deviation and the strict control factor) is established and solidified as the structural response control threshold.
[0202] E42. Substitute the structural saliency overflow data into the preset activation function for calculation to obtain the mapping gain variable with asymptotic convergence characteristics.
[0203] The activation function is configured as follows: the mapping gain variable increases monotonically with the increase of the structural significance overflow data, and within the calculation interval where the structural significance overflow data is greater than zero, the growth slope of the mapping gain variable decreases monotonically with the increase of the structural significance overflow data, so that the mapping gain variable converges to the preset saturation upper limit value.
[0204] The monotonically increasing property of the activation function ensures a positive activation mechanism: the more a pixel resembles a real physical grid line (the larger the overflow data), the larger the mapping gain variable assigned to it will be.
[0205] The monotonically decreasing slope of the activation function and its convergence to an upper limit construct an anti-overexposure mechanism: as the structural saliency overflow data is greater than zero and continues to surge, the derivative of the function (the growth slope) will continuously decrease. This means that the scaling of the gain will become increasingly gradual, eventually being suppressed by the preset saturation upper limit value. This mechanism simulates the physical mechanism of lateral inhibition and light adaptation in biological vision. On the one hand, it can moderately amplify the hidden crack features at the weak edge (structural saliency overflow data slightly greater than zero), making them clearly visible after brightening the dark areas; on the other hand, when the physical features are already sufficiently obvious, they will be limited, eliminating the risk of overexposure and blown-out whites caused by excessive local high-frequency features.
[0206] E43. Extract the preset base retention coefficient, sum the base retention coefficient with the mapping gain variable, and generate the dynamic correction ratio.
[0207] In digital image processing engineering, the baseline retention factor is typically set to an objective constant of 1.0, representing the most conservative baseline for the original high-frequency data of photovoltaic panels: that is, without any addition or subtraction of features, the original data is multiplied by 1.0 and remains unchanged. This baseline retention factor is then simply added to the mapping gain variable, which has positive and negative polarities.
[0208] When dealing with isolated noise points, the structural saliency overflow data is negative, resulting in a negative mapping gain variable output by the activation function. Adding a negative number to 1.0 at this point will generate a dynamic correction factor less than 1, which will then be used to suppress high-frequency values.
[0209] When dealing with a real structure, the mapping gain variable is positive. Adding a positive number to 1.0 will generate a dynamic correction factor greater than 1 and bounded, which will then be used to amplify high-frequency values.
[0210] E44. Multiply the high-frequency values of the corresponding coordinates with the dynamic correction factor to generate corrected high-frequency characteristic values.
[0211] The high-frequency values are multiplied and mapped pixel by pixel to obtain the corrected high-frequency feature values. In the underlying matrix structure, the corrected high-frequency feature values represent a high-frequency physical reflection film that has been polished by the algorithm. In this output film, all isolated snow noise caused by complex weather lighting or camera sensors is strongly compressed by a factor of less than 1. Meanwhile, all grid line breaks, microcracks or physical scratches that are crucial for photovoltaic defect detection are moderately enhanced by a factor of greater than 1 and are absolutely safe.
[0212] Regarding the preset activation function mentioned in step E42, this application further discloses it, employing an adaptive activation formula based on algebraic smoothing normalization, the specific formula of which is as follows:
[0213] ;
[0214] in:
[0215] This represents the calculated mapping gain variable;
[0216] The structural saliency overflow data represents the input (i.e., the difference between the structural confidence coefficient and the structural response control threshold, which has positive and negative polarities).
[0217] This represents the preset upper limit value of saturation. This parameter physically limits the maximum amplification amplitude boundary allowed for this high-frequency characteristic when encountering a physical fault with extremely strong reflection.
[0218] This represents the structural sensitivity adjustment coefficient, used to control the slope of the hyperbolic tangent function curve;
[0219] It is the hyperbolic tangent function.
[0220] In this mathematical model, structural saliency overflow data with positive and negative polarities is included. via structural sensitivity adjustment coefficient After scaling, it can be directly used as the hyperbolic tangent function. The independent variable is solved algebraically, and the preset upper limit of saturation is used. Limit its final mapped amplitude.
[0221] The above formula utilizes The inherent properties of odd functions (i.e.) , (where is the independent variable) perfectly balances two diametrically opposed physical states within a continuous formula:
[0222] when When there is isolated noise, a negative gain is automatically output to suppress the feature;
[0223] when When (in the real structure), a positive gain is automatically output to enhance the features.
[0224] The derivative is .along with As the value of the positive overflow increases, its derivative decreases strictly, smoothly, and monotonically, approaching zero. When the feature is sufficiently significant, the growth of the mapping gain variable slows down, and its value is always less than [value missing]. .
[0225] When features are at seemingly ambiguous boundaries (i.e.) When it approaches 0, The function is not only continuous at the origin but also extremely smooth. This ensures that when reconstructing the image, there will be no abrupt, visually visible banding artifacts at the boundary between noise and real texture, guaranteeing the visual naturalness and optical fidelity of the final output map.
[0226] In practical photovoltaic physics microscopic imaging, the gradient ratio (structure confidence coefficient) of pure background noise is typically around 1.0 to 1.5, while the gradient ratio (structure confidence coefficient) of extremely sharp silver grid lines can reach 15.0 to 20.0. For conventional photovoltaic panel images, when encountering extremely sharp silver grid lines, the positive overflow data... Typically, the negative overflow is around 10 to 20; while for isolated image background noise, the negative overflow data is usually between -2 and -5. This is due to the hyperbolic tangent function. In the independent variable When the absolute value of is greater than 2.5, it enters an extremely gradual saturation region. Therefore, by adjusting the coefficient... The original Map it to the interval of the independent variable.
[0227] Based on the above physical quantity distribution, the structural sensitivity adjustment coefficient is specified in the embodiment. The preferred value range is 2.0 to 10.0. In a specific embodiment for flaw detection of a typical monocrystalline silicon photovoltaic panel, the preferred value is... The value is 5.0. This is combined with a saturation upper limit value set to 1.5. The following three typical physical scenarios are given:
[0228] Scenario 1: Encountering strong physical textures (such as clear mesh lines), );
[0229] Substituting into the formula and solving, the activated term is .
[0230] At this time, the mapping gain variable .
[0231] It detected a strong physical structure with extremely keen sensitivity and released near-… The maximum gain provides a highly protective amplification to the texture without exceeding the 1.5 full load limit.
[0232] Scenario 2: Encountering isolated random noise points (such as background dark current), );
[0233] Substituting into the formula and solving, the activated term is .
[0234] at this time .
[0235] Faced with clear unstructured features, a negative gain variable is smoothly output, which will force the amplitude of the noise point to be reduced when the baseline is superimposed in the subsequent process, thus achieving targeted noise reduction.
[0236] Scenario 3: Encountering ambiguous boundaries (such as extremely faint hidden crack endpoints), );
[0237] Substituting into the formula and solving, the activated term is .
[0238] at this time .
[0239] For this weak feature in a critical state, a mild, smooth, and small positive gain is assigned. This not only preserves the weak tip of the hidden crack extending outward, but also avoids color banding artifacts caused by abrupt truncation.
[0240] Regarding the output process of the reconstructed pixel array data mentioned in step A6, this application further discloses the following:
[0241] F1. Align and assimilate the brightness matrix, hue data matrix, and saturation data matrix according to the corresponding pixel coordinates;
[0242] In the specific underlying matrix processing, the two-dimensional spatial coordinates of the image are used. To establish a unified anchor point, the assimilated luminance matrix output from the aforementioned calculation is aligned pixel-by-pixel with the hue data matrix and saturation data matrix decoupled from the original image and preserved intact in step A1.
[0243] F2. The three sets of aligned matrix data are overlaid and stitched together at the channel level to reconstruct a three-dimensional HSV space target matrix;
[0244] At the underlying data structure level, the channel-wise concatenation instruction is invoked to combine three identical data structures. Two-dimensional single-channel scalar matrices are stacked along the third dimension (channel dimension) to synthesize a single data dimension. 3D data tensor.
[0245] F3. Call the preset spatial inverse mapping algorithm to inversely transform the HSV spatial target matrix to the red-green-blue color space and generate a recombined color three-channel pixel matrix;
[0246] Extract each coordinate point from the 3D HSV spatial target matrix of Triple data ( (representing hue, saturation, and lightness respectively), calling the preset HSV to RGB non-linear color conversion formula (i.e., based on the hue range). Calculate sectors, combine and By progressively calculating the corresponding red (R), green (G), and blue (B) grayscale components between 0 and 255, the three-dimensional HSV tensor is mapped pixel by pixel into a two-dimensional pixel array containing three independent channels: R, G, and B.
[0247] F4 outputs the reconstructed color three-channel pixel matrix as the reconstructed pixel array data.
[0248] The calculated RGB three-channel pixel matrix is standardized and encapsulated (e.g., converted to a standard three-channel 8-bit unsigned integer pixel matrix) and submitted as the final data stream of the entire processing. The final output reconstructed pixel array data physically appears as a high-definition color image of a photovoltaic panel taken under uniform, cloudless, sunny conditions. This data, as a standardized data interface, can be directly fed into backend industrial-grade flaw detection models such as Convolutional Neural Networks (CNN), YOLO, or Transformer. Because the false shadow boundaries projected by cloudy weather have been accurately removed at the underlying level, the downstream defect identification model no longer needs to expend additional parameters and computing power to learn features that resist shadow interference. It can focus on identifying real dust adhesion, glass breakage, grid fracture, or internal hot spots on the panel surface with extremely high confidence and sensitivity, fundamentally solving the industry problem of extremely high false alarm rates in drone inspections under complex outdoor weather conditions.
[0249] like Figure 3 As shown, this application discloses a photovoltaic panel defect detection method based on UAV vision, including: an image acquisition and brightness decoupling module, a high-frequency and low-frequency feature decoupling module, a shadow region recognition module, a dynamic gain calculation module, a shadow compensation and feature fusion module, and an image reconstruction output module; wherein:
[0250] The image acquisition and brightness decoupling module is used to acquire color pixel array data collected by the UAV, map the color pixel array data to the HSV space, and extract the two-dimensional brightness matrix of the brightness channel.
[0251] The high-frequency and low-frequency feature decoupling module is used to perform high-frequency and low-frequency decoupling calculations on the two-dimensional brightness matrix, separating the low-frequency illumination background matrix and the high-frequency reflection feature matrix.
[0252] The shadow region identification module is used to extract dark spot connected regions in the two-dimensional brightness matrix that are below a preset low-order value threshold, and to perform differential evolution analysis based on the gray-scale change characteristics of the boundary pixels of the dark spot connected regions to extract shadow region data that meets the preset continuous and gradual decay conditions.
[0253] The dynamic gain calculation module is used to extract the local lighting background value corresponding to the shadow area data in the low-frequency lighting background matrix, and calculate the dynamic gain multiplier of each pixel coordinate point in the shadow area data based on the brightness ratio between the average brightness value of the global non-shadow area and the local lighting background value.
[0254] The shadow compensation and feature fusion module is used to perform pixel-by-pixel mapping calculations on the pixel values of the corresponding shadow area data in the two-dimensional brightness matrix and the dynamic gain multiplier, and to perform data fusion calculations on the mapping calculation results and the high-frequency values of the corresponding coordinates in the high-frequency reflection feature matrix to obtain the assimilated brightness matrix.
[0255] The image reconstruction output module is used to merge the assimilated brightness matrix with the hue data matrix and saturation data matrix separated from the color pixel array data, and output the reconstructed pixel array data for photovoltaic panel defect identification.
[0256] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.
Claims
1. A method for detecting defects in photovoltaic panels based on UAV vision, characterized in that: Includes the following steps: Acquire color pixel array data collected by the drone, map the color pixel array data to the HSV space, and extract the two-dimensional luminance matrix of the luminance channel; The two-dimensional brightness matrix is subjected to high-frequency and low-frequency decoupling calculations to separate the low-frequency illumination background matrix and the high-frequency reflection feature matrix; Extract the dark spot connected regions in the two-dimensional brightness matrix that are below a preset low-bit value threshold, and perform differential evolution analysis based on the gray-scale change characteristics of the boundary pixels of the dark spot connected regions to extract the shadow region data that meets the preset continuous and gradual decay conditions. Extract the local lighting background value corresponding to the shadow area data in the low-frequency lighting background matrix, and calculate the dynamic gain multiplier of each pixel coordinate point in the shadow area data based on the brightness ratio between the average brightness value of the global non-shadow area and the local lighting background value. The pixel values corresponding to the shadow area data in the two-dimensional brightness matrix are mapped to the dynamic gain multiplier for pixel-by-pixel calculation, and the mapping calculation result is fused with the high-frequency values of the corresponding coordinates in the high-frequency reflection feature matrix to obtain the assimilated brightness matrix. The assimilated brightness matrix is merged with the hue data matrix and saturation data matrix separated from the color pixel array data to output reconstructed pixel array data for photovoltaic panel defect identification.
2. The photovoltaic panel defect detection method based on UAV vision according to claim 1, characterized in that: The calculation process of the dynamic gain multiplier includes: Extract all pixel values in the non-shaded areas of the two-dimensional brightness matrix, and generate the average brightness value by calculating the arithmetic mean. Extract the relative magnitude features between the average brightness value and the local illumination background value at the corresponding pixel coordinate point, and perform numerical calculations using a preset proportional mapping algorithm to generate a basic mapping base. Using the pixel coordinates to be calculated as the center, extract the local grayscale variance of the two-dimensional brightness matrix within a neighborhood window of a preset pixel size; Substituting the local gray-level variance into a preset mapping attenuation function, an adaptive adjustment index that is negatively correlated with the local gray-level variance is calculated. Using the base mapping radix as the base and the adaptive adjustment index as the exponent, a power operation is performed to generate the dynamic gain multiplier corresponding to the pixel coordinate point.
3. The photovoltaic panel defect detection method based on UAV vision according to claim 2, characterized in that: The process of generating the basic mapping cardinality is as follows: Calculate the initial illuminance quotient of the average luminance value relative to the local illumination background value, and use the initial illuminance quotient as the relative magnitude feature; Obtain a mapping cutoff threshold that matches a preset image noise tolerance coefficient, and compare the initial illumination quotient with the mapping cutoff threshold to execute the proportional mapping algorithm: If the initial illuminance quotient is determined to be less than or equal to the mapping cutoff threshold, the initial illuminance quotient is output as the basic mapping base. If the initial illuminance quotient is determined to be greater than the mapping cutoff threshold, the overflow difference between the initial illuminance quotient and the mapping cutoff threshold is calculated. The overflow difference is substituted into a preset logarithmic compression function for attenuation calculation to generate an attenuation compensation value; The mapping truncation threshold and the attenuation compensation value are added together to generate the basic mapping base.
4. The photovoltaic panel defect detection method based on UAV vision according to claim 1, characterized in that: The process of obtaining the assimilation brightness matrix is as follows: Extract a neighborhood window of a preset size centered on the corresponding coordinate point in the high-frequency reflection feature matrix, and calculate the two-dimensional gradient vector of the high-frequency values within the neighborhood window of the preset size; Extract the maximum principal direction gradient magnitude and the orthogonal direction gradient magnitude perpendicular to the maximum principal direction from the two-dimensional gradient vector; The ratio of the maximum principal direction gradient magnitude to the orthogonal direction gradient magnitude is calculated to generate the structural confidence coefficient. The structure confidence coefficient and the high-frequency value of the corresponding coordinate are weighted and corrected to generate corrected high-frequency feature values; Obtain a preset brightness saturation extreme value, calculate the numerical difference between the brightness saturation extreme value and the corresponding mapping calculation result, and generate an available space redundancy value; The modified high-frequency feature value is scaled based on the available spatial redundancy value to generate an adaptive high-frequency fusion component. The mapping calculation result is summed with the adaptive high-frequency fusion component to generate the assimilated brightness value of the corresponding coordinate point, and all pixel coordinate points are combined to form the assimilated brightness matrix.
5. The photovoltaic panel defect detection method based on UAV vision according to claim 4, characterized in that: The weighted correction operation process for the corrected high-frequency feature values is as follows: A preset structural response control threshold is obtained, and the structural confidence coefficient is calculated by performing a difference operation on the structural response control threshold to generate structural saliency overflow data. The structural saliency overflow data is substituted into a preset activation function for calculation to obtain the mapping gain variable with asymptotic convergence characteristics. The activation function is configured such that the mapping gain variable increases monotonically with the increase of the structural saliency overflow data, and within the calculation interval where the structural saliency overflow data is greater than zero, the growth slope of the mapping gain variable decreases monotonically with the increase of the structural saliency overflow data, so that the mapping gain variable converges to a preset saturation upper limit value. Extract the preset base retention coefficient, and sum the base retention coefficient with the mapping gain variable to generate a dynamic correction ratio; The high-frequency value of the corresponding coordinate is multiplied by the dynamic correction factor to generate the corrected high-frequency feature value.
6. The photovoltaic panel defect detection method based on UAV vision according to claim 1, characterized in that: The process of performing high-frequency and low-frequency decoupling calculations on the two-dimensional brightness matrix is as follows: Obtain the Gaussian weighted operator with a preset kernel size; The low-frequency illumination background matrix is generated by performing a convolution smoothing calculation on the two-dimensional brightness matrix and the Gaussian weighted operator. The high-frequency reflection feature matrix is generated by performing a logarithmic difference operation between the pixel values in the two-dimensional brightness matrix and the pixel values at the corresponding coordinates in the low-frequency illumination background matrix.
7. The photovoltaic panel defect detection method based on UAV vision according to claim 1, characterized in that: The process for extracting the shadow area data is as follows: Obtain the set of boundary pixel coordinates of the connected region of the dark spot; Using the coordinate points in the set of boundary pixel coordinates as reference points, the brightness values of the corresponding coordinates are extracted along the set normal direction to construct a boundary gradient evolution data sequence. Perform first-order numerical difference calculation on the boundary gradient evolution data sequence to generate difference change distribution data; The length of pixel intervals in statistical difference variation distribution data where the first-order difference value is continuously greater than a preset gradient threshold; If the length of the pixel interval is greater than a preset continuously gradually varying length threshold, and the first-order difference value shows a monotonically decreasing trend within the pixel interval, then the boundary gradient evolution data sequence is determined to meet the preset continuously gradually varying decay condition, and the corresponding dark spot connected region is marked as the shadow region data.
8. The photovoltaic panel defect detection method based on UAV vision according to claim 7, characterized in that: The process of constructing the boundary gradient evolution data sequence is as follows: Calculate the curvature tangent vector of the reference point in the boundary pixel coordinate set; Obtain the normal vector orthogonal to the curvature tangent vector; According to a preset step size pixel distance, extend along the normal vector to the outside of the dark spot connected region to a preset extension length, and obtain the brightness value of each coordinate point on the extension path in the two-dimensional brightness matrix; The brightness values are arranged in order of distance along the extension path to generate the boundary gradient evolution data sequence.
9. The photovoltaic panel defect detection method based on UAV vision according to claim 1, characterized in that: The process of acquiring the recombined pixel array data is as follows: Align the assimilation brightness matrix, the hue data matrix, and the saturation data matrix according to the corresponding pixel coordinates; The three sets of aligned matrix data are then overlaid and stitched together at the channel level to reconstruct a three-dimensional HSV spatial target matrix. The preset spatial inverse mapping algorithm is invoked to inversely transform the HSV spatial target matrix to the red-green-blue color space, generating a recombined color three-channel pixel matrix; The reconstructed color three-channel pixel matrix is output as the reconstructed pixel array data.
10. A photovoltaic panel defect detection system based on UAV vision, characterized in that: include: The image acquisition and brightness decoupling module is used to acquire color pixel array data collected by the UAV, map the color pixel array data to the HSV space, and extract the two-dimensional brightness matrix of the brightness channel. The high-frequency and low-frequency feature decoupling module is used to perform high-frequency and low-frequency decoupling calculations on the two-dimensional brightness matrix to separate the low-frequency illumination background matrix and the high-frequency reflection feature matrix. The shadow region identification module is used to extract dark spot connected regions in the two-dimensional brightness matrix that are below a preset low-order value threshold, and to perform differential evolution analysis based on the gray-scale change characteristics of the boundary pixels of the dark spot connected regions to extract shadow region data that meets the preset continuous and gradual decay conditions. The dynamic gain calculation module is used to extract the local lighting background value corresponding to the shadow area data in the low-frequency lighting background matrix, and calculate the dynamic gain multiplier of each pixel coordinate point in the shadow area data according to the brightness ratio relationship between the average brightness value of the global non-shadow area and the local lighting background value. The shadow compensation and feature fusion module is used to perform pixel-by-pixel mapping calculations on the pixel values of the shadow area data in the two-dimensional brightness matrix and the dynamic gain multiplier, and to perform data fusion calculations on the mapping calculation results and the high-frequency values of the corresponding coordinates in the high-frequency reflection feature matrix to obtain the assimilated brightness matrix. The image reconstruction output module is used to merge the assimilated brightness matrix with the hue data matrix and saturation data matrix separated from the color pixel array data, and output the reconstructed pixel array data for photovoltaic panel defect identification.
