A real-time cloud cover monitoring method based on all-sky imager

By adjusting the exposure of the all-sky imager and removing ground object areas, combined with RGB value and H channel edge detection, combined with texture feature analysis, the problem of cloud calculation error under low light is solved, and the detection of thick and thin clouds is achieved. Accurate separation improves the accuracy and real-time performance of cloud cover monitoring.

CN117808736BActive Publication Date: 2024-10-08WUHAN DOUYU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311411317.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-29
Publication Date
2024-10-08
Estimated Expiration
2043-10-29

AI Technical Summary

Technical Problem

Existing cloud cover monitoring methods based on all-sky imagers are difficult to accurately distinguish clouds and sky areas under low light conditions, resulting in cloud cover calculation errors, and cannot effectively separate thick clouds and thin clouds.

Method used

Obtain a suitable sky image by adjusting the camera exposure, remove ground object areas, use RGB value and H channel edge detection combined with texture feature analysis to obtain the total cloud amount, and separate thick clouds and thin clouds based on set thresholds.

Benefits of technology

It improves the accuracy of cloud cover calculation, can accurately identify cloud cover under low light conditions, and distinguish thick clouds and thin clouds in real time, providing more comprehensive cloud cover information for power prediction of photovoltaic power stations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117808736B_ABST
    Figure CN117808736B_ABST
Patent Text Reader

Abstract

The invention relates to a cloud amount real-time monitoring method based on an all-sky imager, comprising: adjusting the exposure of a camera based on an image taken by the all-sky imager until a set requirement is met, and obtaining a real-time sky image P1 taken by the all-sky imager; removing a ground object area in the image P1 to obtain an image P2; obtaining RGB values ​​of each pixel point in the image P2, obtaining a value of an H channel in an HSV color space based on the RGB value of the image P2, fusing edge detection results of R, G, B and H channels of the image P2, and combining with texture feature analysis to obtain a total cloud amount; separating thick cloud and thin cloud amounts in the total cloud amount based on a set threshold; cloud amount calculation errors caused by sky brightness and ground objects can be avoided, and accuracy can be improved; thick cloud and thin cloud amounts can be distinguished in real time from the total cloud amount, and more comprehensive cloud amount information can be provided for optical power prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of ground-based remote sensing cloud cover detection, and in particular to a cloud cover real-time monitoring method based on an all-sky imager. Background Art

[0002] Compared with traditional power generation methods, photovoltaic power generation has the advantages of being environmentally friendly, renewable, and low in maintenance costs, but this method is easily affected by factors such as weather conditions and cloud cover. Therefore, it is particularly important to predict the power generation efficiency of photovoltaic modules through power forecasting and scientifically dispatch the power generation of photovoltaic power stations.

[0003] Since cloud cover is the main factor affecting the ground irradiance received by photovoltaic modules, most current power prediction methods predict ground irradiance by monitoring the formation, disappearance and movement of clouds over photovoltaic power stations, and then complete power prediction. At present, cloud cover monitoring methods can be divided into two methods: air-based monitoring and ground-based monitoring. Air-based monitoring refers to the use of satellite cloud image data to predict ground irradiance, but the time and spatial resolution of satellite cloud images are limited, and it may not be possible to accurately capture the rapid changes in clouds and small-scale changes in clouds. This may lead to inaccurate estimates of the actual radiation conditions of photovoltaic power plants, thereby affecting the accuracy of power prediction. Ground-based monitoring refers to the use of ground-based equipment such as all-sky imagers to capture real-time images of the sky and use algorithms to obtain cloud information. Since the equipment is placed within the scope of the photovoltaic power station for monitoring, it can better capture the rapid changes in small-scale clouds compared to air-based monitoring methods, and is also the main method of cloud cover monitoring in current optical power prediction.

[0004] When inverting cloud cover based on images of all-sky imagers, the mainstream inversion method is to use a fixed red-to-blue ratio threshold to identify pixels. However, when the sky is clear and the cloud cover is small, this method will process high-brightness white points near the sun and near the horizon as cloud points, resulting in cloud cover calculation errors. In order to solve this problem, the invention with application number 201710832341.9 proposes a real-time dynamic cloud cover inversion method based on ground-based cloud maps. The method establishes a clear sky database and calculates the atmospheric turbidity correction factor and solar parameters to correct the impact of the environment on the red-to-blue ratio, thereby reducing the calculation error. However, the red-to-blue algorithm itself is an algorithm that is sensitive to lighting conditions. When the light intensity is low, such as dusk or cloudy days, the red-to-blue algorithm may not be able to correctly distinguish between clouds and other sky areas, resulting in reduced recognition accuracy. In addition, for different types of clouds, such as thick clouds and thin clouds, their color characteristics may be quite different, and the red-to-blue algorithm may not be able to accurately evaluate the cloud cover in this case. The above invention only considers the calibration of high-brightness pixels, and does not consider the cloud cover calculation error when the light intensity is low. Summary of the invention

[0005] In view of the technical problems existing in the prior art, the present invention provides a real-time cloud cover monitoring method based on a full-sky imager, which can avoid cloud cover calculation errors caused by sky brightness and ground objects and improve accuracy; thick cloud and thin cloud cover can be distinguished in real time from the total cloud cover, providing more comprehensive cloud cover information for optical power prediction.

[0006] According to a first aspect of the present invention, a method for real-time monitoring of cloud cover based on an all-sky imager is provided, comprising:

[0007] Step 1, adjusting the exposure of the camera based on the image taken by the all-sky imager until the set requirements are met, and obtaining a real-time sky image P1 taken by the all-sky imager;

[0008] Step 2, removing the ground feature area in the image P1 to obtain the image P2;

[0009] Step 3, obtaining the RGB value of each pixel in the image P2, obtaining the value of the H channel based on the RGB value of the image P2, fusing the edge detection results of the R, G, B and H channels of the image P2, and combining with the texture feature analysis to obtain the total cloud cover;

[0010] Step 4: Separate the thick cloud and thin cloud in the total cloud amount based on the set threshold.

[0011] Based on the above technical solution, the present invention can also make the following improvements.

[0012] Optionally, the process of adjusting the exposure of the camera based on the image captured by the all-sky imager in step 1 until the set requirements are met includes:

[0013] Step 101, converting the image captured by the all-sky imager into a grayscale image;

[0014] Step 102, performing edge extension on the grayscale image;

[0015] Step 103, traverse each pixel of the grayscale image, and calculate the gradient differences Ex and Ey in the horizontal and vertical directions;

[0016] Step 104, compare |Ex| and |Ey| of each pixel respectively, take the larger value of |Ex| and |Ey| as the weight of the current pixel; accumulate the sum of the weights of all pixels W1 and the sum of the weighted pixel values ​​W2, and calculate the final threshold T=W2 / W1;

[0017] Step 105 , comparing the final threshold T with a preset threshold range, and adjusting the exposure of the all-sky imager camera when the preset requirement is not met.

[0018] Optionally, the method for obtaining the image P2 after removing the ground object area from the image P1 in step 2 includes: manually or automatically processing to obtain the ground object boundary; the method for automatically processing the ground object boundary includes:

[0019] Step 201, obtain the image P1 taken by the all-sky imager that meets the installation requirements within a set time range; the installation requirement is that the ground objects within a set range around the all-sky imager are located within a set circular ring range;

[0020] Step 202, after extracting the RGB values of the image P1, perform grayscale processing on the image P1 to obtain grayscale values, and within the circular ring range, perform edge recognition based on the grayscale values and RGB channel data to determine the ground object coverage area;

[0021] Step 203, if the ground object coverage areas delimited by the image P1 for more than a set number of days are the same, then remove the ground object coverage area from the image P1 to obtain the image P2.

[0022] Optionally, the process of obtaining the value of the H channel based on the RGB values of the image P2 in step 3 includes:

[0023] Step 301, divide the values of each of the R, G, and B channels by 255 and map them to the range [0, 1];

[0024] Step 302, find the maximum value max and the minimum value min among the normalized R, G, and B values;

[0025] Step 303, perform the following conversion to obtain the value of the H channel for each point in the image:

[0026] If max = min, then H = 0;

[0027] If max = R and G ≥ B, then H = 60° × (G - B) / (max - min);

[0028] If max = R and G < B, then H = 60° × (G - B) / (max - min) + 360°;

[0029] If max = G, then H = 60° × (B - R) / (max - min) + 120°;

[0030] If max = B, then H = 60° × (R - G) / (max - min) + 240°.

[0031] Optionally, the process of calculating the edge detection results of the R, G, B, and H channels of the image P2 in step 3 includes:

[0032] Step 304, performing Gaussian filtering to remove noise on the values ​​of the R, G, B and H channels;

[0033] Step 305, defining an edge operator Sobel_x for detecting the horizontal direction and an edge operator Sobel_y for detecting the vertical direction;

[0034]

[0035]

[0036] Step 306, convolve the Sobel_x and Sobel_y with the filtered RGB channel and H channel respectively to calculate the gradient value:

[0037] G_x(x,y)=sum_{i,j}(I(x+i,y+j)*Sobel_x(i,j))

[0038] G_y(x,y)=sum_{i,j}(I(x+i,y+j)*Sobel_y(i,j))

[0039] Where I(x,y) represents the filtered image, G_x(x,y) and G_y(x,y) are the gradient values ​​in the x-direction and y-direction respectively;

[0040] Step 307, calculate the gradient amplitude of each channel G(x,y)=sqrt(G_x(x,y)^2+G_y(x,y)^2) according to the gradient values ​​in the x direction and the y direction;

[0041] Step 308, calculate the gradient direction of each channel according to the gradient values ​​in the x direction and the y direction θ(x,y)=arctan2(G_y(x,y),G_x(x,y));

[0042] Among them, arctan2 is the inverse tangent function.

[0043] Optionally, the process of fusing the edge detection results of the R, G, B and H channels of the image P2 in step 3 includes:

[0044] Step 309, normalize the gradient magnitude matrix of each channel to the range of [0,1]:

[0045] G_R_norm=G_R / max(G_R)

[0046] G_G_norm=G_G / max(G_G)

[0047] G_B_norm=G_B / max(G_B)

[0048] G_H_norm = G_H / max(G_H);

[0049] Step 310, add the normalized gradient magnitude matrices according to the weights to calculate the weighted gradient magnitude matrix: G_fused=w_R*G_R_norm+w_G*G_G_norm+w_B*G_B_norm+w_H*G_H_norm;

[0050] The weights of the four channels are w_R, w_G, w_B and w_H, and w_R+w_G+w_B+w_H=1;

[0051] Step 311, binarize the weighted gradient magnitude matrix G_fused to obtain a final fused edge image; wherein all values ​​in G_fused that are greater than the binarization threshold are set to 1, and other values ​​are set to 0.

[0052] Optionally, the characteristic value S of the texture feature in step 3 = Σs(gp-gc)*2 i ;

[0053] Among them, P represents the central pixel, (x, y) represents the coordinates of the surrounding pixels of the central pixel P, gc represents the grayscale value of the central pixel P, and gp represents the grayscale value of the surrounding i-th pixel; s(x) represents the sign function, when x≥0, s(x)=1; when x<0, s(x)=0.

[0054] Optionally, the process of obtaining the total cloud cover in step 3 includes: checking the pixels on the left and right sides of each edge pixel, marking the edge pixels on the side with a higher pixel texture eigenvalue S value as clouds; marking the edge pixels on the other side as sky; and obtaining the total cloud cover data.

[0055] Optionally, step 4 includes:

[0056] The image P2 is grayed and a binarization threshold H is calculated to mark the image P2 as a cloud covered area; when H<Ht, it is marked as a thin cloud, otherwise it is a thick cloud; Ht is the separation value between thin clouds and thick clouds.

[0057] Optionally, the separation value Ht is obtained through training; the training samples are a large number of sky images taken by an all-sky imager, the binarization threshold H of the cloud coverage area of ​​each training sample is calculated, and the cloud coverage area in the training sample is marked as thick cloud or thin cloud using cloud radar echo data.

[0058] The present invention provides a cloud cover real-time monitoring method based on a full sky imager. The present invention provides a full sky imager device based on a visible light band, which is mainly composed of a full sky imager host and a data receiving and processing unit; the full sky imager host is used to obtain a full sky real-time image, and the data receiving and processing unit receives the full sky image taken by the full sky imager in real time, and obtains real-time total cloud cover, thin cloud cover, thick cloud cover and other data after algorithm processing; after the data receiving and processing unit obtains the image taken by the full sky imager host, it controls the exposure of the camera through a sky brightness adaptive algorithm to obtain a sky image with appropriate brightness. The data receiving and processing unit processes the sky image with appropriate brightness to obtain the total cloud cover, thin cloud cover, thick cloud cover and other results after removing ground objects. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A flowchart of an embodiment of a method for real-time monitoring of cloud cover based on an all-sky imager provided by the present invention;

[0060] Figure 2 A schematic structural diagram of an embodiment of a cloud cover real-time monitoring device based on a full sky imager provided by the present invention;

[0061] Figure 3 A flow chart of a sky brightness adaptive algorithm provided by an embodiment of the present invention;

[0062] Figure 4 A flow chart of a feature boundary processing algorithm provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0063] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0064] Figure 1 A flowchart of an embodiment of a cloud cover real-time monitoring method based on an all-sky imager provided by the present invention is shown in FIG. Figure 1 As shown, the method includes:

[0065] Step 1: After adjusting the exposure of the camera based on the image taken by the all-sky imager until the set requirements are met, a real-time sky image P1 taken by the all-sky imager is obtained.

[0066] In a specific implementation, after adjusting the exposure of the camera until the set requirements are met, a real-time sky image P1 with appropriate brightness can be captured by the all-sky imager, thereby minimizing the impact of sky brightness on cloud recognition, such as in periods of low brightness such as early morning and dusk.

[0067] Step 2: remove the ground object area in image P1 to obtain image P2.

[0068] In a specific implementation, after removing the part covered by ground objects based on the sky image P1, the cloud amount calculation error can be reduced.

[0069] Step 3, obtain the RGB value of each pixel in image P2, obtain the value of the H channel based on the RGB value of image P2, fuse the edge detection results of the R, G, B and H channels of image P2, and combine with texture feature analysis to obtain the total cloud cover.

[0070] Step 4: Separate the thick cloud and thin cloud in the total cloud amount based on the set threshold.

[0071] The present invention provides a real-time cloud cover monitoring method based on a full-sky imager, which can avoid cloud cover calculation errors caused by sky brightness and ground objects and improve accuracy; it can distinguish thick cloud and thin cloud amounts in real time from the total cloud cover, and provide more comprehensive cloud cover information for optical power prediction.

[0072] Example 1

[0073] The present invention provides Figure 1 An embodiment of a cloud cover real-time monitoring method based on an all-sky imager provided by the present invention, Figure 2 This is a structural schematic diagram of an embodiment of a cloud cover real-time monitoring device based on a total sky imager provided by the present invention. The present invention provides a total sky imager device based on the visible light band, which is mainly composed of a total sky imager host and a data receiving and processing unit.

[0074] The all-sky imager host is used to obtain real-time images of the entire sky. The data receiving and processing unit receives the all-sky images taken by the all-sky imager in real time. After algorithm processing, real-time total cloud amount, thin cloud amount, thick cloud amount and other data are obtained.

[0075] After the data receiving and processing unit obtains the image taken by the all-sky imaging host, it controls the exposure of the camera through the sky brightness adaptive algorithm to obtain a sky image with appropriate brightness. The data receiving and processing unit processes the sky image with appropriate brightness to obtain the results of total cloud amount, thin cloud amount and thick cloud amount.

[0076] Figure 3 A flow chart of a sky brightness adaptive algorithm provided by an embodiment of the present invention; Figure 4 A flow chart of a feature boundary processing algorithm provided by an embodiment of the present invention, combined with Figure 1-Figure 4 It can be seen that the embodiment of the cloud cover real-time monitoring method includes:

[0077] Step 1: After adjusting the exposure of the camera based on the image taken by the all-sky imager until the set requirements are met, a real-time sky image P1 taken by the all-sky imager is obtained.

[0078] In a possible embodiment, in step 1, the shooting brightness of the all-sky imager can be automatically controlled by a sky brightness adaptive algorithm. Specifically, in step 1, the process of adjusting the exposure of the camera based on the image shot by the all-sky imager until the set requirements are met includes:

[0079] Step 101: convert the image captured by the all-sky imager into a grayscale image.

[0080] Step 102: perform edge extension on the grayscale image.

[0081] Step 103, traverse each pixel of the grayscale image and calculate the gradient differences Ex and Ey in the horizontal and vertical directions.

[0082] Step 104, compare |Ex| and |Ey| of each pixel respectively, take the larger value of |Ex| and |Ey| as the weight of the current pixel; accumulate the sum of the weights W1 of all pixels and the sum of the weighted pixel values ​​W2, and calculate the final threshold T=W2 / W1.

[0083] |Ex| and |Ey| represent the absolute values ​​of Ex and Ey, respectively.

[0084] Step 105 , comparing the final threshold T with a preset threshold range, and adjusting the exposure of the all-sky imager camera when the preset requirement is not met.

[0085] Step 2: remove the ground object area in image P1 to obtain image P2.

[0086] In a possible embodiment, in a specific implementation, there are two methods for removing the feature area in the image P1 in step 2: manual and automatic. The manual method is to manually divide the area covered by the feature on the image P1 in the software interface. The automatic feature boundary processing method can be:

[0087] Step 201 , obtaining an image P1 captured by an all-sky imager that meets installation requirements within a set time range; the installation requirement is that ground objects within a set range around the all-sky imager are located within a set circular range.

[0088] In specific implementation, the all-sky imager is required to be installed without any obstruction within 5m around it. If there are few and unavoidable ground objects, their position on the sky image is within the specified circle. The setting time can be selected as noon.

[0089] Step 202, after extracting the RGB value of the image P1, the image P1 is grayed to obtain the gray value, and within the range of the ring, edge recognition is performed based on the gray value and the RGB channel data to determine the coverage area of ​​the ground object.

[0090] Step 203: If the ground object coverage areas delimited by the images P1 over the set number of days are the same, then this area is recognized as the ground object coverage area, and the ground object coverage area is removed from the image P1 to obtain the image P2.

[0091] In specific implementation, the set number of days can be the noon images for three consecutive days.

[0092] Step 3: Obtain the RGB values of each pixel point in the image P2, obtain the value of the H channel based on the RGB values of the image P2, fuse the edge detection results of the R, G, B, and H channels of the image P2, and combine with texture feature analysis to obtain the total cloud amount.

[0093] In a possible implementation manner, the process of obtaining the value of the H channel based on the RGB values of the image P2 in Step 3 includes:

[0094] Step 301: Divide the values of each of the R, G, and B channels by 255 and map them to the range [0, 1].

[0095] Step 302: Find the maximum value max and the minimum value min among the normalized R, G, and B values.

[0096] Step 303: Perform the following transformation to obtain the value of the H channel of each point in the image:

[0097] If max = min, then H = 0.

[0098] If max = R and G ≥ B, then H = 60°×(G - B) / (max - min).

[0099] If max = R and G < B, then H = 60°×(G - B) / (max - min)+360°.

[0100] If max = G, then H = 60°×(B - R) / (max - min)+120°.

[0101] If max = B, then H = 60°×(R - G) / (max - min)+240°.

[0102] In a possible implementation manner, the process of calculating the edge detection results of the R, G, B, and H channels of the image P2 in Step 3 includes:

[0103] Step 304: Perform Gaussian filtering denoising on the values of the R, G, B, and H channels.

[0104] Performing Gaussian filtering denoising processing can effectively eliminate high-frequency noise in the image and reduce false detections and missed detections in edge detection.

[0105] Step 305 , define an edge operator Sobel_x for detecting the horizontal direction and an edge operator Sobel_y for detecting the vertical direction.

[0106]

[0107]

[0108] Step 306, convolve Sobel_x and Sobel_y with the filtered RGB channel and H channel respectively to calculate the gradient value:

[0109] G_x(x,y)=sum_{i,j}(I(x+i,y+j)*Sobel_x(i,j))

[0110] G_y(x,y)=sum_{i,j}(I(x+i,y+j)*Sobel_y(i,j))

[0111] Among them, I(x,y) represents the filtered image, G_x(x,y) and G_y(x,y) are the gradient values ​​in the x direction and y direction respectively.

[0112] Step 307, calculate the gradient amplitude of each channel G(x,y)=sqrt(G_x(x,y)^2+G_y(x,y)^2) according to the gradient values ​​in the x direction and the y direction.

[0113] Step 308, calculate the gradient direction θ(x,y)=arctan2(G_y(x,y),G_x(x,y)) of each channel according to the gradient values ​​in the x direction and the y direction.

[0114] Among them, arctan2 is the inverse tangent function, which can calculate the inverse tangent value of the quotient of two parameters.

[0115] In a possible implementation manner, the process of fusing the edge detection results of the R, G, B, and H channels of the image P2 in step 3 includes:

[0116] Step 309, normalize the gradient magnitude matrix of each channel to the range of [0,1]:

[0117] In a specific implementation, this can be achieved by dividing by the maximum gradient amplitude of each channel.

[0118] G_R_norm=G_R / max(G_R)

[0119] G_G_norm=G_G / max(G_G)

[0120] G_B_norm=G_B / max(G_B)

[0121] G_H_norm = G_H / max(G_H).

[0122] Step 310, add the normalized gradient magnitude matrices according to the weights to calculate the weighted gradient magnitude matrix: G_fused = w_R*G_R_norm+w_G*G_G_norm+w_B*G_B_norm+w_H*G_H_norm.

[0123] The weights of the four channels are w_R, w_G, w_B and w_H, and w_R+w_G+w_B+w_H=1.

[0124] Step 311, binarize the weighted gradient magnitude matrix G_fused to obtain a final fused edge image.

[0125] In the specific implementation, all values ​​in G_fused that are greater than the binarization threshold are set to 1, and other values ​​are set to 0.

[0126] In a possible embodiment, the characteristic value S of the texture feature in step 3 = Σs(gp-gc)*2 i .

[0127] Among them, P represents the central pixel, (x, y) represents the coordinates of the surrounding pixels of the central pixel P, gc represents the grayscale value of the central pixel P, and gp represents the grayscale value of the surrounding i-th pixel; s(x) represents the sign function, when x≥0, s(x)=1; when x<0, s(x)=0.

[0128] Σ represents the sum of all surrounding pixels.

[0129] Since cloud textures are usually more complex and irregular, while sky textures are relatively simple and smooth, the process of obtaining the total cloud amount in step 3 includes: checking the pixels on the left and right sides of each edge pixel and comparing the texture feature values ​​of these pixels. The edge pixels on the side with higher pixel texture feature value S are marked as clouds; the edge pixels on the other side are marked as sky; and the total cloud amount data is obtained.

[0130] Step 4: Separate the thick cloud and thin cloud in the total cloud amount based on the set threshold.

[0131] In a possible implementation manner, step 4 includes:

[0132] The image P2 is grayed and the binarization threshold H is calculated to mark the cloud coverage area of ​​the image P2. When H<Ht, it is recorded as thin cloud, otherwise it is thick cloud. Ht is the separation value between thin cloud and thick cloud.

[0133] In a possible implementation mode, a full sky imager is placed next to the cloud radar to calculate the binarization threshold H of the cloud coverage area in a large number of images. The cloud radar echo data is used to determine whether the cloud in each image is thick or thin, so that the separation value Ht of thin and thick clouds can be obtained through multiple training samples.

[0134] After distinguishing between thin clouds and thick clouds, the corresponding cloud amount data can be obtained.

[0135] The present invention develops a real-time cloud cover monitoring method based on a self-developed all-sky imager. The method first automatically controls the all-sky imager to capture real-time sky images with brightness that meets the requirements through a sky brightness adaptive algorithm, thereby minimizing the impact of sky brightness on cloud cover recognition. Secondly, in order to reduce the errors caused by ground objects, a ground object boundary processing algorithm is developed. When calculating cloud cover, the area covered by ground objects can be automatically or manually eliminated. Finally, in addition to obtaining total cloud cover information, the method proposed in the present invention can separate thin cloud and thick cloud cover by comparing with cloud radar echo signals; it can provide more abundant data for the optical power prediction of photovoltaic power stations and has high practical value.

[0136] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0137] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0138] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0139] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0141] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0142] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A real-time cloud monitoring method based on all-sky imager, It is characterized in that The cloud cover real-time monitoring method comprises: Step 1, adjusting the exposure of the camera based on the image taken by the all-sky imager until the set requirements are met, and obtaining a real-time sky image P1 taken by the all-sky imager; Step 2, removing the ground feature area in the image P1 to obtain the image P2; Step 3, obtaining the RGB value of each pixel in the image P2, obtaining the value of the H channel based on the RGB value of the image P2, fusing the edge detection results of the R, G, B and H channels of the image P2, and combining with the texture feature analysis to obtain the total cloud cover; Step 4: Separate the thick cloud and thin cloud in the total cloud amount based on the set threshold.

2. The cloud cover real-time monitoring method according to claim 1, It is characterized in that The process of adjusting the exposure of the camera based on the image captured by the all-sky imager until the set requirements are met in step 1 includes: Step 101, converting the image captured by the all-sky imager into a grayscale image; Step 102, performing edge extension on the grayscale image; Step 103, traverse each pixel of the grayscale image, and calculate the gradient differences Ex and Ey in the horizontal and vertical directions; Step 104, compare |Ex| and |Ey| of each pixel respectively, take the larger value of |Ex| and |Ey| as the weight of the current pixel; accumulate the sum of the weights of all pixels W1 and the sum of the weighted pixel values ​​W2, and calculate the final threshold T=W2 / W1; Step 105 , comparing the final threshold T with a preset threshold range, and adjusting the exposure of the all-sky imager camera when the preset requirement is not met.

3. The cloud cover real-time monitoring method according to claim 1, It is characterized in that The method for obtaining the image P2 after removing the object area in the image P1 in step 2 includes: manually or automatically processing to obtain the object boundary; wherein the method for automatically processing the object boundary includes: Step 201, obtaining an image P1 taken by the all-sky imager within a set time range that meets the installation requirement; the installation requirement is that the ground objects within a set range around the all-sky imager are within a set circular range; Step 202, after extracting the RGB value of the image P1, grayscale processing is performed on the image P1 to obtain the grayscale value, and edge recognition is performed within the range of the ring based on the grayscale value and the RGB channel data to determine the coverage area of ​​the ground object; Step 203: If the land feature coverage areas defined by the image P1 for more than a set number of days are the same, the land feature coverage areas are removed from the image P1 to obtain the image P2.

4. The cloud cover real-time monitoring method according to claim 1, It is characterized in that The process of obtaining the value of the H channel based on the RGB value of the image P2 in step 3 includes: Step 301, divide the R, G and B channel values ​​by 255 and map them to the range of [0,1]; Step 302, finding the maximum value max and the minimum value min among the normalized R, G, and B values; Step 303: Transform to obtain the H-channel values of each point in the image according to the following formula: If max = min, then H = 0; If max = R and G ≥ B, then H = 60°×(G - B) / (max - min); If max = R and G < B, then H = 60°×(G - B) / (max - min)+360°; If max = G, then H = 60°×(B - R) / (max - min)+120°; If max = B, then H = 60°×(R - G) / (max - min)+240°.

5. The real-time cloud amount monitoring method according to claim 1, characterized in that the process of calculating the edge detection results of the R, G, B, and H channels of the image P2 in step 3 includes: Step 304: Perform Gaussian filtering denoising on the values of the R, G, B, and H channels; Step 305: Define the edge operator Sobel_x for detecting the horizontal direction and the edge operator Sobel_y for detecting the vertical direction; Sobel_x = |-1 0 1| |-2 0 2| Step 306: Convolve the Sobel_x and Sobel_y with the filtered RGB channels and H channels respectively to calculate the gradient values: G_x(x,y) = sum_{i,j}(I(x + i,y + j)*Sobel_x(i,j)) G_y(x,y) = sum_{i,j}(I(x + i,y + j)*Sobel_y(i,j)) where I(x,y) represents the filtered image, and G_x(x,y) and G_y(x,y) are the gradient values in the x direction and y direction respectively; Step 307: Calculate the gradient magnitude G(x,y) = sqrt(G_x(x,y)^2+G_y(x,y)^2) of each channel according to the gradient values in the x direction and y direction; Step 308: Calculate the gradient direction θ(x,y) = arctan2(G_y(x,y),G_x(x,y)) of each channel according to the gradient values in the x direction and y direction; where arctan2 is the arctangent function.

6. The real-time cloud amount monitoring method according to claim 5, characterized in that the process of fusing the edge detection results of the R, G, B, and H channels of the image P2 in step 3 includes: Step 309: Normalize the gradient magnitude matrix of each channel to the range of [0,1]: G_R_norm = G_R / max(G_R) G_G_norm = G_G / max(G_G) G_B_norm = G_B / max(G_B) G_H_norm = G_H / max(G_H); Step 310: Add the normalized gradient magnitude matrices according to the weights to calculate the weighted gradient magnitude matrix: G_fused = w_R*G_R_norm+w_G*G_G_norm+w_B*G_B_norm+w_H*G_H_norm; The weights of the four channels are w_R, w_G, w_B and w_H, and w_R+w_G+w_B+w_H=1; Step 311, binarize the weighted gradient magnitude matrix G_fused to obtain a final fused edge image; wherein all values ​​in G_fused that are greater than the binarization threshold are set to 1, and other values ​​are set to 0.

7. The cloud cover real-time monitoring method according to claim 1, It is characterized in that The characteristic value of the texture feature in step 3 is S=Σs(gp-gc)*2 i ; Among them, P represents the central pixel, (x, y) represents the coordinates of the surrounding pixels of the central pixel P, gc represents the grayscale value of the central pixel P, and gp represents the grayscale value of the surrounding i-th pixel; s(x) represents the sign function, when x≥0, s(x)=1; when x<0, s(x)=0.

8. The cloud cover real-time monitoring method according to claim 1, It is characterized in that The process of obtaining the total cloud amount in step 3 includes: checking the pixels on the left and right sides of each edge pixel, marking the edge pixels on the side with a higher pixel texture eigenvalue S value as clouds; marking the edge pixels on the other side as sky; and obtaining the total cloud amount data.

9. The cloud cover real-time monitoring method according to claim 1, It is characterized in that The step 4 comprises: The image P2 is grayed and a binarization threshold H is calculated to mark the image P2 as a cloud covered area; when H<Ht, it is marked as a thin cloud, otherwise it is a thick cloud; Ht is the separation value between thin clouds and thick clouds.

10. The cloud cover real-time monitoring method according to claim 9, It is characterized in that The separation value Ht is obtained through training; the training samples are a large number of sky images taken by the all-sky imager, the binarization threshold H of the cloud coverage area of ​​each training sample is calculated, and the cloud radar echo data is used to mark the cloud coverage area in the training sample as thick cloud or thin cloud.