Sky image light spot elimination method and device based on CCM, and medium

By using a CCM-based method that combines grayscale thresholding, filtering, and a fully convolutional neural network, the problem of incomplete restoration of light spot noise in all-sky imagers is solved, achieving efficient and low-power sky image restoration, which is suitable for scenarios such as drone panoramic monitoring and vehicle surround view.

CN121921184APending Publication Date: 2026-04-24BEIJING INST OF SPECIALIZED MACHINERY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING INST OF SPECIALIZED MACHINERY
Filing Date
2025-11-27
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively remove spot noise caused by sunlight noise in all-sky imagers. Traditional methods suffer from missed detections or incomplete repairs, and deep learning-based methods are costly and difficult to apply in engineering.

Method used

A CCM-based approach is adopted to determine the sun center through grayscale thresholding and connected component analysis. A sky mask is generated by combining the fisheye center, and tangential and radial Gaussian filtering is performed. Brightness compensation is carried out using a fully convolutional neural network, and image correction is performed through a color correction matrix to achieve pixel-level brightness and color consistency restoration.

Benefits of technology

It achieves efficient and low-power sky image spot removal, outputting restored images with original resolution and RMSE<4, suitable for scenarios such as drone panoramic monitoring, vehicle surround view, and smart weather stations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921184A_ABST
    Figure CN121921184A_ABST
Patent Text Reader

Abstract

The invention provides a sky image light spot elimination method and device based on CCM and a medium, and the method comprises the steps: determining the coordinates of the center of the sun based on the gray threshold segmentation and connected domain analysis of a preprocessed image, and generating a sky mask in combination with the center and radius of a fisheye; sequentially carrying out tangential Gaussian filtering and radial Gaussian filtering on the sky area covered by the mask to obtain a filtered image; filtering each sky pixel in the image, sequentially inputting the sky pixel into a three-path pixel brightness reconstruction network according to the zenith angle of the pixel and the included angle between the zenith angle and the center of the sun to obtain a brightness compensation value of a corresponding color channel, and completing pixel-level brightness compensation; and inputting the compensated image into a color correction network to generate a 3 * 3 color correction matrix, and performing matrix multiplication on the compensated image to obtain a corrected image. According to the method, the processing speed and the calculation precision are improved, the color consistency and the detail recovery of the sky image are improved, and the method has extremely high practicability and engineering prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of visual image processing and visual generation technology, and in particular to a method, apparatus and computer-readable storage medium for eliminating light spots in sky images based on CCM (Color Correction Matrix). Background Technology

[0002] As all-sky imagers have evolved, in order to capture a more complete view of the sky, most of the obstructions used to block direct sunlight have been removed. However, due to the wide-angle nature of fisheye lenses, this results in more pronounced sunlight noise. (Appendix) Figure 1 These are schematic diagrams illustrating three typical types of sunlight noise. Reflection noise occurs when sunlight enters the lens and is reflected, forming numerous spots or patches of light of varying shapes. Its location changes with the sun's position, typically appearing on the line connecting the zenith and the heliocenter. Solar halo noise, also known as scattering noise, often appears irregularly and diverges around the sun. This type of stripe noise is closely related to the lens's protective cover; wear and the inherent roughness of the hardware increase scattering noise. Compared to other noise types, it has a higher grayscale value, and the value increases closer to the sun. Spot noise is caused by changes in the surface coating of the all-sky camera due to dust, watermarks, etc., during long-term observation. These marks produce strong reflections when the sun is directly overhead, making them clearly visible. However, when the sun's position changes (i.e., the illumination direction does not overlap with the marks), spot noise has minimal impact.

[0003] As can be seen, the three types of noise mentioned above exhibit strong randomness in their location, color representation, and shape regularity. Furthermore, the noise itself has a significant impact on key issues such as image radiative information. Traditional denoising methods, such as time-series methods, are ineffective for spot noise and light bands in cloudless conditions. While cloudy conditions can repair reflected noise, this method can destroy cloud image information if cloud cover changes significantly during the shooting time series. Therefore, time-series methods are effective in restoring sky information affected by reflected noise, but their application conditions are demanding, requiring almost unchanged weather conditions to ensure complete sky radiance, and they cannot completely remove noise. Dense time-series methods, while removing halo and spot noise to some extent, over-repair the solar area and some cloud layers. Spot detection methods use edge detection operators to accurately identify bright spots, but the false negative rate for spot and faint spot detection remains high. Other methods, such as inputting measured sky and atmospheric data into the Modtran radiative transfer model to generate clean sky images, are extremely costly and involve cumbersome measurement procedures. When there are insufficient data points, edge overfitting will occur. Images generated by nonlinear least squares inverse modeling based on the CIE distribution model (CIE: International Commission on Illumination, the CIE distribution model represents the standard sky brightness distribution) also suffer from edge overfitting. Furthermore, the computational resources and prediction time consumed by these fitting methods are insufficient for engineering requirements. The aforementioned traditional methods and empirical physical models for removing light spots all suffer from issues such as missed detections, inability to repair detected spots, or incomplete repair. Deep learning-based image generation methods require long-term measurements and large amounts of labeled data, posing cost issues for engineering applications. Therefore, a new all-sky light spot image restoration method is needed that balances accuracy and engineering practicality. Summary of the Invention

[0004] The present invention aims to provide a method, apparatus, and computer-readable storage medium for eliminating light spots in sky images based on CCM to overcome or at least partially solve the above-mentioned problems.

[0005] To achieve the above objectives, the technical solution of the present invention is specifically implemented as follows:

[0006] The first aspect of this invention provides a method for eliminating light spots in sky images based on CCM, comprising:

[0007] Based on grayscale thresholding and connected component analysis of the preprocessed image, the coordinates of the sun center are determined, and a sky mask is generated by combining the fisheye center and radius.

[0008] Tangential Gaussian filtering and radial Gaussian filtering are applied sequentially to the sky region covered by the mask to obtain the filtered image;

[0009] For each sky pixel in the filtered image, the zenith angle of the pixel and the angle between the zenith angle and the center of the sun are sequentially input into the three-channel pixel brightness reconstruction network to obtain the brightness compensation value of the corresponding color channel, thus completing pixel-level brightness compensation.

[0010] The compensated image is input into a color correction network to generate a 3×3 color correction matrix, and matrix multiplication is performed on the compensated image to obtain the corrected image.

[0011] Optionally, the step of determining the coordinates of the sun's center based on grayscale thresholding and connected component analysis of the preprocessed image, and generating a sky mask by combining the fisheye center and radius, includes:

[0012] Highlight candidate regions are extracted using a preset grayscale threshold;

[0013] Using a pre-defined connected component labeling function, the connected component with the largest area is selected as the solar spot, and its centroid is determined to be the center of the sun.

[0014] Filter out pixels outside the imaging area using a preset fisheye center and a preset fisheye radius to remove cloud layers;

[0015] A binary sky mask is obtained by performing preset processing.

[0016] Optionally, the preset grayscale threshold is 230, the preset fisheye center is at (795, 800) pixel coordinates, and the preset fisheye radius is 660 pixels.

[0017] Optionally, the step of sequentially performing tangential Gaussian filtering and radial Gaussian filtering on the sky region covered by the mask to obtain the filtered image includes:

[0018] Denoising was performed by applying 1D Gaussian kernels along the tangential and radial directions in the mask-covered area, while preserving the large-scale structure of the cloud layer. The standard deviation of the tangential Gaussian kernel was 3, and the standard deviation of the radial Gaussian kernel was 5.

[0019] Optionally, the pixel brightness reconstruction network adopts a six-layer fully connected neural network with 64 hidden nodes in each layer, and uses the output of the seven-parameter CIE brightness model as the residual benchmark.

[0020] Alternatively, pixel-level brightness compensation can be calculated using the following formula:

[0021]

[0022] Among them, I p PZA is the image brightness, PZA is the zenith angle, SPA is the sun-pixel angle, and a is the image brightness. 1-7 These are the model coefficients.

[0023] Optionally, the color correction network extracts image color statistics through global average pooling and outputs the 3×3 color correction matrix through a two-layer fully connected network.

[0024] Alternatively, the corrected image can be calculated using the following formula:

[0025] I_out=I_in·W T

[0026] Where I_in is the reconstructed brightness image, W is the training weight matrix, and I_out is the corrected image.

[0027] A second aspect of the present invention provides a sky image spot removal device based on CCM, comprising:

[0028] The extraction module is used to determine the coordinates of the sun center based on grayscale thresholding and connected component analysis of the preprocessed image, and to generate a sky mask by combining the fisheye center and radius.

[0029] The filtering module is used to sequentially perform tangential Gaussian filtering and radial Gaussian filtering on the sky area covered by the mask to obtain the filtered image;

[0030] The compensation module is used to filter each sky pixel in the image. Based on the zenith angle of the pixel and the angle between it and the center of the sun, it is sequentially input into the three-way pixel brightness reconstruction network to obtain the brightness compensation value of the corresponding color channel, thus completing pixel-level brightness compensation.

[0031] The correction module is used to input the compensated image into the color correction network, generate a 3×3 color correction matrix, and perform matrix multiplication on the compensated image to obtain the corrected image.

[0032] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described CCM-based sky image spot removal method.

[0033] Therefore, the sky image glare removal method, device and medium based on CCM provided by this invention achieves independent glare compensation for the three color channels (R, G and B) by using a residual-corrected fully convolutional neural network and the CIE atmospheric glare model, while ensuring processing speed and calculation accuracy. Combined with the CCM network, it can perform efficient color remapping based on an optimized 3x3 correction matrix, significantly improving the color consistency and detail recovery of sky images, and has extremely high practicality and engineering prospects. Attached Figure Description

[0034] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 Schematic diagrams of various types of solar noise;

[0036] Figure 2 A flowchart of a sky image spot removal method based on CCM provided in an embodiment of the present invention;

[0037] Figure 3 A flowchart illustrating a specific example of a sky image spot removal method based on CCM provided in this invention.

[0038] Figure 4 This is a schematic diagram comparing the CCM generation results provided in this embodiment of the invention with those of other methods;

[0039] Figure 5 This is a schematic diagram of the structure of the sky image spot elimination device based on CCM provided in an embodiment of the present invention. Detailed Implementation

[0040] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0041] Figure 2 A flowchart of the sky image spot removal method based on CCM provided in this embodiment of the invention is shown. See [link / reference]. Figure 2 The sky image spot removal method based on CCM provided in this embodiment of the invention includes:

[0042] S1, based on grayscale thresholding and connected component analysis of the preprocessed image, determines the coordinates of the sun center and generates a sky mask by combining the center and radius of the fisheye circle.

[0043] Specifically, this step involves extracting the sky mask and locating the center of the sun (or spot) based on the preprocessed image.

[0044] As an optional implementation of this invention, the step of determining the coordinates of the sun's center based on grayscale thresholding and connected component analysis of the preprocessed image, and generating a sky mask by combining the fisheye center and radius, includes:

[0045] Highlight candidate regions are extracted using a preset grayscale threshold;

[0046] Using a pre-defined connected component labeling function, the connected component with the largest area is selected as the solar spot, and its centroid is determined to be the center of the sun.

[0047] Filter out pixels outside the imaging area using a preset fisheye center and a preset fisheye radius to remove cloud layers;

[0048] A binary sky mask is obtained by performing preset processing.

[0049] The preset grayscale threshold is 230, the preset fisheye center is (795, 800) pixel coordinates, and the preset fisheye radius is 660 pixels.

[0050] In specific implementation, this invention can first extract the bright candidate region of the original image using a grayscale threshold of HIGH=230; then, using an 8-connected component labeling function, select the connected component with the largest area as the sun spot, whose centroid is the sun center (x_c, y_c). Subsequently, pixels outside the imaging area are filtered using the fisheye center CENTER=(795,800) and radius R=660; then, cloud layers are removed; after processing, a binary sky mask skyMask=1 (sky) / 0 (clouds or ground features) is obtained, and the sun center is returned.

[0051] As an optional implementation of this invention, the cloud removal includes: removing clouds according to a fixed threshold; or removing clouds using an Otsu adaptive threshold.

[0052] Specifically, the cloud removal method provided by the present invention can remove clouds in the following two ways: Method 1 is a fixed threshold LOW = 120, and Method 2 is an Otsu adaptive threshold.

[0053] S2, perform tangential Gaussian filtering and radial Gaussian filtering sequentially on the sky region covered by the mask to obtain the filtered image.

[0054] Specifically, after extracting the sky mask, this step can perform sky-separable filtering.

[0055] As an optional implementation of this invention, the step of sequentially performing tangential Gaussian filtering and radial Gaussian filtering on the sky region covered by the mask to obtain the filtered image includes:

[0056] Denoising was performed by applying 1D Gaussian kernels along the tangential and radial directions in the mask-covered area, while preserving the large-scale structure of the cloud layer. The standard deviation of the tangential Gaussian kernel was 3, and the standard deviation of the radial Gaussian kernel was 5.

[0057] In practice, 1D Gaussian kernels (σ_t=3, σ_r=5°) are applied tangentially and radially in the skyMask region to achieve noise reduction while preserving the large-scale structure of the clouds.

[0058] S3, for each sky pixel in the filtered image, the zenith angle of the pixel and the angle between the zenith angle and the center of the sun are sequentially input into the three-way pixel brightness reconstruction network to obtain the brightness compensation value of the corresponding color channel, thus completing pixel-level brightness compensation.

[0059] Specifically, this step can perform pixel-level brightness reconstruction.

[0060] As an optional embodiment of the present invention, the pixel brightness reconstruction network adopts a six-layer fully connected neural network with 64 hidden nodes in each layer, and uses the output of the seven-parameter CIE brightness model as the residual benchmark.

[0061] Specifically, this invention can use a three-way FCN (Fully Convolutional Network) network to independently compensate the R / G / B channels. Each FCN network receives two-dimensional angular features (PZA, SPA), with a network structure of 2→FC64×6→1, and adds it to the residual of the seven-parameter atmospheric brightness distribution model to output the final brightness value.

[0062] As an optional embodiment of the present invention, the final brightness value is calculated according to the following formula:

[0063]

[0064] Among them, I p PZA is the image brightness, PZA is the zenith angle, SPA is the sun-pixel angle, and a is the image brightness. 1-7 These are the model coefficients.

[0065] As an optional embodiment of the present invention, the sky image spot elimination method based on CCM provided by the present invention further includes: training the pixel brightness reconstruction network;

[0066] Training the pixel brightness reconstruction network includes:

[0067] The pixel brightness reconstruction network is trained for the R / G / B channels respectively. The training data is calculated pixel by pixel (PZA, SPA) of the calibration image, and the label is the brightness of the corresponding channel.

[0068] Specifically, to accurately fit the sky brightness distribution, this invention trains an FCN network for each of the R / G / B channels. Training data: (PZA, SPA) is calculated pixel-by-pixel on the calibration image, with the label representing the brightness of the corresponding channel.

[0069] S4, the compensated image is input into the color correction network to generate a 3×3 color correction matrix, and matrix multiplication is performed on the compensated image to obtain the corrected image.

[0070] Specifically, this step can perform color consistency correction.

[0071] As an optional implementation of this invention, the color correction network extracts image color statistics through global average pooling and outputs the 3×3 color correction matrix through a two-layer fully connected network.

[0072] Specifically, this invention uses a 3×3 learnable matrix W to perform linear color remapping on the compensated image.

[0073] As an optional implementation of this invention, the reconstructed original resolution image is calculated according to the following formula:

[0074] I_out=I_in·W T

[0075] Where I_in is the reconstructed brightness image, W is the training weight matrix, and I_out is the reconstructed original resolution image.

[0076] The sky image glare removal method based on CCM provided in this invention quickly extracts the sky mask in spherical coordinates through a brightness-gradient first-order depth-separable convolution and locates the center of the sun glare. Then, it uses pixel angle features (zenith angle PZA, sun-pixel azimuth angle SPA) as input to a lightweight residual-corrected fully convolutional neural network (FCN) to predict the theoretical brightness pixel by pixel and perform radial compensation on the glare area to generate a glare-free, low-noise sky brightness map. On this basis, an end-to-end 3x3 color integrated generation network (CCM) is used. This network takes the compensated panoramic image as input and outputs the color correction matrix in only 0.2ms after global average pooling and a lightweight MLP.

[0077] Therefore, the sky image glare removal method based on CCM provided in this invention is the first to achieve a method architecture of "pixel-level brightness reconstruction + global CCM remapping". After correction by this method, a repaired image with the original resolution and RMSE < 4 can be output. It achieves real-time, low-power, and high-precision pure sky image output, and can be widely used in scenarios with strict requirements for color consistency and power consumption, such as UAV panoramic monitoring, vehicle surround view, and intelligent weather stations.

[0078] See below for reference. Figure 3 and Figure 4 The sky image spot removal method based on CCM provided in this embodiment of the invention will be further described below:

[0079] 1) Sky mask and solar center positioning

[0080] This invention first extracts bright candidate regions using a grayscale threshold of HIGH = 230; then, using an 8-connected domain labeling function, it selects the connected domain with the largest area as the solar spot, whose centroid is the solar center (x_c, y_c). Subsequently, it filters pixels outside the imaging area using the fisheye center CENTER = (795, 800) and radius R = 660; next, it removes clouds using two methods: method one is a fixed threshold LOW = 120, and method two is an Otsu adaptive threshold. After processing, a binary sky mask skyMask = 1 (sky) / 0 (clouds or ground features) is obtained, and the solar center is returned. The pseudocode is as follows:

[0081]

[0082] 2) Sky Separable Filtering

[0083] Denoising was achieved by applying 1D Gaussian kernels (σ_t=3, σ_r=5°) along the tangential and radial directions in the skyMask region, while preserving the large-scale structure of the clouds.

[0084] 3) Pixel-level brightness reconstruction (FCN)

[0085] This step uses a three-way FCN network to independently compensate the R / G / B channels. Each FCN network receives two-dimensional angular features (PZA, SPA), with a network structure of 2→FC64×6→1, and adds it to the residual of the seven-parameter atmospheric brightness distribution model to output the final brightness value. The formula is as follows:

[0086]

[0087] Where I p PZA is the image brightness, PZA is the zenith angle, SPA is the sun-pixel angle, and a is the image brightness. 1-7 These are the model coefficients.

[0088] To accurately fit the sky brightness distribution, an FCN network was trained for each of the R, G, and B channels. Training data: (PZA, SPA) was calculated pixel-by-pixel on the calibration image, with the label representing the brightness of the corresponding channel. The pseudocode is as follows:

[0089]

[0090]

[0091] FCN Network Inference Pseudocode

[0092]

[0093] 4) Color Consistency Correction (CCM)

[0094] Using a 3×3 learnable matrix W, linear color remapping is performed on the compensated image, as shown in the following formula:

[0095] I_out=I_in·W T (2)

[0096] I_in is the reconstructed brightness image, W is the training weight matrix, and I_out is the reconstructed original resolution image (see appendix). Figure 4 )

[0097] Figure 5 This diagram illustrates the structure of a sky image glare removal device based on CCM according to an embodiment of the present invention. This CCM-based sky image glare removal device applies the aforementioned method. The following is only a brief description of the structure of the CCM-based sky image glare removal device; for other matters not covered herein, please refer to the relevant descriptions in the aforementioned CCM-based sky image glare removal method. Figure 3 The sky image spot removal device based on CCM provided in this embodiment of the invention includes:

[0098] The extraction module is used to determine the coordinates of the sun center based on grayscale thresholding and connected component analysis of the preprocessed image, and to generate a sky mask by combining the fisheye center and radius.

[0099] The filtering module is used to sequentially perform tangential Gaussian filtering and radial Gaussian filtering on the sky area covered by the mask to obtain the filtered image;

[0100] The compensation module is used to filter each sky pixel in the image. Based on the zenith angle of the pixel and the angle between it and the center of the sun, it is sequentially input into the three-way pixel brightness reconstruction network to obtain the brightness compensation value of the corresponding color channel, thus completing pixel-level brightness compensation.

[0101] The correction module is used to input the compensated image into the color correction network, generate a 3×3 color correction matrix, and perform matrix multiplication on the compensated image to obtain the corrected image.

[0102] As an optional implementation of this invention, the extraction module determines the coordinates of the sun's center based on grayscale thresholding and connected component analysis of the preprocessed image, and generates a sky mask by combining the fisheye center and radius:

[0103] Highlight candidate regions are extracted using a preset grayscale threshold;

[0104] Using a pre-defined connected component labeling function, the connected component with the largest area is selected as the solar spot, and its centroid is determined to be the center of the sun.

[0105] Filter out pixels outside the imaging area using a preset fisheye center and a preset fisheye radius to remove cloud layers;

[0106] A binary sky mask is obtained by performing preset processing.

[0107] As an optional implementation of this invention, the preset grayscale threshold is 230, the preset fisheye center is at (795, 800) pixel coordinates, and the preset fisheye radius is 660 pixels.

[0108] As an optional implementation of this invention, the filtering module performs tangential Gaussian filtering and radial Gaussian filtering sequentially on the sky region covered by the mask to obtain a filtered image in the following manner:

[0109] Denoising was performed by applying 1D Gaussian kernels along the tangential and radial directions in the mask-covered area, while preserving the large-scale structure of the cloud layer. The standard deviation of the tangential Gaussian kernel was 3, and the standard deviation of the radial Gaussian kernel was 5.

[0110] As an optional implementation of the present invention, the pixel brightness reconstruction network adopts a six-layer fully connected neural network with 64 hidden nodes in each layer, and uses the output of the seven-parameter CIE brightness model as the residual benchmark.

[0111] As an optional implementation method provided by this invention, pixel-level brightness compensation is calculated according to the following formula:

[0112]

[0113] Among them, I p PZA is the image brightness, PZA is the zenith angle, SPA is the sun-pixel angle, and a is the image brightness. 1-7 These are the model coefficients.

[0114] As an optional implementation of this invention, the color correction network extracts image color statistics through global average pooling and outputs the 3×3 color correction matrix through a two-layer fully connected network.

[0115] As an optional implementation method provided by the present invention, the corrected image is calculated according to the following formula:

[0116] I_out=I_in·W T

[0117] Where I_in is the reconstructed brightness image, W is the training weight matrix, and I_out is the corrected image.

[0118] Therefore, the sky image glare removal device based on CCM provided in this invention is the first to realize a method architecture of "pixel-level brightness reconstruction + global CCM remapping". After correction by this method, a repaired image with the original resolution and RMSE < 4 can be output. It achieves real-time, low-power, and high-precision pure sky image output, and can be widely used in scenarios with strict requirements for color consistency and power consumption, such as UAV panoramic monitoring, vehicle surround view, and intelligent weather stations.

[0119] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described CCM-based sky image spot removal method.

[0120] Specifically, the hardware platform that can be used in the embodiments of the present invention is such as a PC, and the algorithm training and inference can be completed on a desktop computer. The typical hardware configuration is listed in the table below; other x86-64 hosts that meet the minimum requirements can also reproduce the present invention.

[0121]

[0122] Therefore, the computer-readable storage medium provided in this embodiment of the invention is the first to realize a method architecture of "pixel-level brightness reconstruction + global CCM remapping". After correction by this method, a repaired image with the original resolution and RMSE < 4 can be output. It realizes real-time, low-power, and high-precision pure sky image output, and can be widely used in scenarios with strict requirements for color consistency and power consumption, such as UAV panoramic monitoring, vehicle surround view, and intelligent weather stations.

[0123] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for eliminating light spots in sky images based on CCM, characterized in that, include: Based on grayscale thresholding and connected component analysis of the preprocessed image, the coordinates of the sun center are determined, and a sky mask is generated by combining the fisheye center and radius. Tangential Gaussian filtering and radial Gaussian filtering are applied sequentially to the sky region covered by the mask to obtain the filtered image; For each sky pixel in the filtered image, the zenith angle of the pixel and the angle between the zenith angle and the center of the sun are sequentially input into the three-channel pixel brightness reconstruction network to obtain the brightness compensation value of the corresponding color channel, thus completing pixel-level brightness compensation. The compensated image is input into a color correction network to generate a 3×3 color correction matrix, and matrix multiplication is performed on the compensated image to obtain the corrected image.

2. The method according to claim 1, characterized in that, The process of determining the sun's center coordinates based on grayscale thresholding and connected component analysis of the preprocessed image, and generating a sky mask by combining the fisheye center and radius, includes: Highlight candidate regions are extracted using a preset grayscale threshold; Using a pre-defined connected component labeling function, the connected component with the largest area is selected as the solar spot, and its centroid is determined to be the center of the sun. Filter out pixels outside the imaging area using a preset fisheye center and a preset fisheye radius to remove cloud layers; A binary sky mask is obtained by performing preset processing.

3. The method according to claim 2, characterized in that, The preset grayscale threshold is 230, the preset fisheye center is (795, 800) pixel coordinates, and the preset fisheye radius is 660 pixels.

4. The method according to claim 1, characterized in that, The process of sequentially performing tangential Gaussian filtering and radial Gaussian filtering on the sky region covered by the mask to obtain the filtered image includes: Denoising was performed by applying 1D Gaussian kernels along the tangential and radial directions in the mask-covered area, while preserving the large-scale structure of the cloud layer. The standard deviation of the tangential Gaussian kernel was 3, and the standard deviation of the radial Gaussian kernel was 5.

5. The method according to claim 1, characterized in that, The pixel brightness reconstruction network adopts a six-layer fully connected neural network with 64 hidden nodes in each layer, and uses the output of the seven-parameter CIE brightness model as the residual benchmark.

6. The method according to claim 5, characterized in that, Pixel-level brightness compensation is calculated using the following formula: Among them, I p PZA is the image brightness, PZA is the zenith angle, SPA is the sun-pixel angle, and a is the image brightness. 1-7 These are the model coefficients.

7. The method according to claim 1, characterized in that, The color correction network extracts image color statistics through global average pooling and outputs the 3×3 color correction matrix through a two-layer fully connected network.

8. The method according to claim 7, characterized in that, The corrected image is calculated using the following formula: I_out=I_in·W T Where I_in is the reconstructed brightness image, W is the training weight matrix, and I_out is the corrected image.

9. A sky image glare removal device based on CCM, characterized in that, include: The extraction module is used to determine the coordinates of the sun center based on grayscale thresholding and connected component analysis of the preprocessed image, and to generate a sky mask by combining the fisheye center and radius. The filtering module is used to sequentially perform tangential Gaussian filtering and radial Gaussian filtering on the sky area covered by the mask to obtain the filtered image; The compensation module is used to filter each sky pixel in the image. Based on the zenith angle of the pixel and the angle between it and the center of the sun, it is sequentially input into the three-way pixel brightness reconstruction network to obtain the brightness compensation value of the corresponding color channel, thus completing pixel-level brightness compensation. The correction module is used to input the compensated image into the color correction network, generate a 3×3 color correction matrix, and perform matrix multiplication on the compensated image to obtain the corrected image.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the CCM-based sky image spot removal method as described in any one of claims 1 to 8.