In recent years, the rapid expansion of photovoltaic energy systems has highlighted the critical need for reliable monitoring of solar panels under diverse environmental conditions. However, foggy weather poses significant challenges to image clarity, obstructing the effective observation of photovoltaic panel status in monitoring systems. This paper addresses the issue by proposing an improved Multi-Scale Retinex with Color Restoration (MSRCR) algorithm tailored for defogging images of solar panels. Our approach integrates bilateral filtering to enhance contrast and color saturation while preserving essential details, thereby improving the visual quality and accuracy of photovoltaic panel images captured in foggy environments.
The importance of clear imagery for photovoltaic systems cannot be overstated. Solar panels, as the core components of photovoltaic energy conversion, require continuous monitoring to ensure optimal performance. Fog, characterized by high humidity and suspended water droplets, scatters and absorbs light, leading to degraded image quality. This degradation impedes the detection of faults, dust accumulation, or other anomalies on photovoltaic surfaces. Traditional defogging methods often struggle with color distortion, loss of detail, or high computational costs, limiting their practicality for real-time applications in photovoltaic farms. For instance, conventional algorithms like Dark Channel Prior may over-emphasize edges or introduce noise, while standard MSRCR suffers from parameter sensitivity and inadequate performance in heavy fog. Our research builds upon these foundations by refining the MSRCR framework with bilateral filtering, resulting in a more robust solution for photovoltaic image enhancement.

To understand the defogging process, it is essential to grasp the physical principles behind fog formation and its impact on images. Fog arises when atmospheric moisture condenses around nuclei, forming droplets that reduce visibility by scattering light. For photovoltaic panels, this manifests as reduced contrast and color fidelity in images, complicating tasks like performance assessment or damage detection. General defogging techniques typically involve estimating atmospheric light and transmission maps to reverse the fogging effect. The atmospheric light (A) represents the haze intensity and can be approximated using the formula: $$ A = I(x) – t \times J(x) $$ where \( I(x) \) is the observed foggy image, \( J(x) \) is the latent fog-free image, and \( t \) denotes the transmission rate. Similarly, the transmission map, often derived from methods like Dark Channel Prior, is given by: $$ t(x) = 1 – \omega \min_{y \in \Omega(x)} \left[ \min_{c \in \{r,g,b\}} \frac{I_c(x)}{A} \right] $$ Here, \( \omega \) controls the defogging strength, with values between 0 and 1. However, these methods frequently introduce artifacts or color shifts, which are particularly problematic for photovoltaic images where accurate color representation is crucial for identifying material defects or soiling.
The Retinex theory, which models human visual perception, forms the basis of MSRCR by separating illumination from reflectance. In its standard form, MSRCR combines multiple scales of Retinex transforms to enhance images. The single-scale Retinex (SSR) for an image \( I(x,y) \) is expressed as: $$ R(x,y) = \log(I(x,y)) – \frac{1}{N} \sum_{i=1}^{N} \log(I(x + d_i, y)) $$ where \( d_i \) represents spatial offsets in a neighborhood of size \( N \). For multi-scale processing, MSRCR aggregates results from different scales: $$ R_{\text{MSRCR}}(x,y) = \sum_{s=1}^{S} w_s \cdot R_s(x,y) $$ with \( S \) scales and weights \( w_s \). Color restoration is then applied to maintain natural hues: $$ R_{\text{Final}}(x,y) = R_{\text{MSRCR}}(x,y) + C \cdot \log(I(x,y)) $$ where \( C \) is a color correction parameter. Despite its advantages, MSRCR can exhibit noise amplification and inadequate detail recovery in complex photovoltaic scenes, prompting our integration of bilateral filtering.
Bilateral filtering is a nonlinear technique that smooths images while preserving edges by considering both spatial proximity and intensity similarity. For a pixel at position \( (x,y) \) in image \( I(x,y) \), the filtered output \( G(x,y) \) is computed as: $$ G(x,y) = \frac{1}{w_p} \sum_{i=1}^{N} I(x + d_i, y) \cdot w_s(d_i) \cdot w_r(|I(x + d_i, y) – I(x,y)|) $$ Here, \( w_s(d_i) \) is the spatial weight, typically a Gaussian function of distance \( d_i \), and \( w_r(\cdot) \) is the range weight based on intensity differences. The normalization factor \( w_p \) ensures the weights sum to one. By incorporating bilateral filtering into MSRCR, we enhance the algorithm’s ability to retain critical details, such as the edges and textures of photovoltaic panels, while reducing noise introduced during defogging.
Our improved MSRCR algorithm modifies the Retinex transformation by substituting the conventional smoothing with bilateral filtering. This leads to the enhanced Retinex output: $$ R'(x,y) = \log(I(x,y)) – \log\left( \left( \prod_{i=1}^{N} G(x + d_i, y) \right)^{\frac{1}{w_p}} \right) $$ Simplifying this expression, we obtain: $$ R'(x,y) = \log\left( \frac{I(x,y)}{ \left( \prod_{i=1}^{N} G(x + d_i, y) \right)^{\frac{1}{w_p}} } \right) $$ To optimize performance, we introduce parameters \( \alpha \) and \( \beta \), resulting in the final form: $$ R'(x,y) = \alpha \cdot \log\left( \frac{I(x,y)}{ \left( \prod_{i=1}^{N} G(x + d_i, y) \right)^{\beta} } \right) $$ These parameters are tuned using gradient descent during experimentation to maximize defogging efficacy for photovoltaic images. The overall workflow of our model involves decomposing the input image into multiple scales, applying bilateral filtering to each Retinex component, and synthesizing the results to produce a clear, enhanced output. This approach ensures that high-frequency details, vital for inspecting solar panels, are preserved while improving overall contrast and color saturation.
To validate our method, we conducted experiments on foggy images of photovoltaic panels from a real-world setting. We compared our improved MSRCR algorithm against traditional bilateral filtering, standard Retinex, and MSRCR using quantitative metrics such as information entropy, average gradient, and spatial frequency. Information entropy measures the richness of detail in an image, with higher values indicating more information content. The average gradient reflects the sharpness and texture clarity, while spatial frequency assesses the overall detail and edge information. The results, summarized in the table below, demonstrate the superiority of our approach in enhancing photovoltaic panel images.
| Algorithm | Information Entropy | Average Gradient | Spatial Frequency |
|---|---|---|---|
| Original Image | 5.266 | 21.232 | 4789.659 |
| Bilateral Filtering | 6.862 | 45.439 | 10626.821 |
| Retinex | 7.023 | 50.626 | 11243.367 |
| MSRCR | 7.221 | 52.325 | 12003.582 |
| Improved MSRCR | 7.630 | 57.406 | 12619.470 |
As shown in the table, our improved MSRCR algorithm achieves the highest scores across all metrics, indicating superior defogging performance. For instance, the information entropy of 7.630 surpasses that of other methods, highlighting its ability to retain and enhance image details relevant to photovoltaic inspection. Similarly, the average gradient of 57.406 and spatial frequency of 12619.470 confirm that our method better preserves edges and textures, which are crucial for identifying issues like micro-cracks or dirt on solar panels. Visually, the enhanced images exhibit more natural colors and reduced noise compared to alternatives, making them suitable for automated monitoring systems in photovoltaic farms.
The integration of bilateral filtering into MSRCR addresses several limitations of existing defogging techniques. For example, while standard MSRCR may struggle with color fidelity in dense fog, our approach maintains accurate color representation through adaptive filtering. Moreover, the computational efficiency of our algorithm makes it feasible for real-time applications, such as continuous surveillance of photovoltaic installations. We further analyzed the impact of parameters \( \alpha \) and \( \beta \) on performance, using optimization techniques to derive ideal values that balance detail enhancement and noise reduction. This optimization process involved iterative adjustments based on gradient descent, ensuring that the algorithm adapts to varying fog conditions commonly encountered in photovoltaic environments.
In conclusion, our research presents a significant advancement in defogging technology for photovoltaic panel images. By combining bilateral filtering with MSRCR, we have developed an algorithm that not only improves contrast and color saturation but also preserves critical details necessary for accurate solar panel assessment. The experimental results validate the effectiveness of our method, demonstrating its potential to enhance monitoring systems in photovoltaic power plants. Future work could explore the integration of deep learning techniques to further optimize parameter selection and extend the algorithm’s applicability to other challenging environments, such as sandstorms or heavy rain, which also affect photovoltaic performance. Ultimately, this contribution supports the sustainable operation of solar energy systems by ensuring reliable image-based monitoring under adverse weather conditions.
The widespread adoption of photovoltaic technology underscores the importance of robust image processing solutions. As solar panels become increasingly integral to global energy grids, methods like our improved MSRCR will play a vital role in maintaining efficiency and longevity. We encourage further research into adaptive algorithms that can dynamically respond to environmental changes, thereby advancing the field of photovoltaic image enhancement and contributing to the broader goal of renewable energy sustainability.
