Method and device for detecting sky cloudiness with high precision
Patent Information
- Application Number
- CN202610751144.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2046-05-28
AI Technical Summary
[0003]针对现有技术的不足,本发明提供了天空云量高精度检测方法及检测装置,解决了现有技术因地物遮挡与低光误判导致的云量检测不准问题
(1)本发明建立了标准的可用观测点筛选体系,通过地物仰角与水平距离的联合判定初筛可疑障碍物,再结合多帧图像连续暗区配对识别固定遮挡物的遮挡占比,从源头排除了固定遮挡导致的云量虚高误差;
Smart Images

Figure CN122289948B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of meteorological observation technology, specifically to a high-precision method and device for detecting cloud cover. Background Technology
[0002] Cloud cover is a core parameter in meteorological observation and climate research, and its detection accuracy directly determines the reliability and accuracy of related applications. However, existing technologies still have the following shortcomings: First, the lack of a screening system for available observation points and the absence of quantitative assessment and effective removal of obstructions from surrounding ground features led to significant errors in cloud cover calculations. Secondly, when multiple frames are fused, an unreasonable selection of the reference frame can easily lead to the gradual accumulation of spatial registration errors. Furthermore, the lack of a unified exposure reference for each frame results in a lack of physical comparability of pixel brightness across different frames. Third, most binary classification of clouds and sky uses global threshold discrimination, without considering the radial distribution difference of sky background brightness, resulting in uneven classification accuracy in different sky areas and reducing the overall accuracy of cloud cover statistics; Therefore, there is an urgent need for a high-precision method and device for detecting cloud cover in the sky. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a high-precision method and device for detecting cloud cover, which solves the problem of inaccurate cloud cover detection caused by ground cover obstruction and low light misjudgment in existing technologies.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a high-precision method for detecting cloud cover, comprising: Step 1: Deploy an ambient light sensor and an all-sky imaging camera at available observation points. When the readings of the ambient light sensor are all below the illuminance threshold for N consecutive sampling periods, and the average gray value of the current frame image acquired by the all-sky imaging camera falls into the low illuminance range, the system is determined to have entered a low-light condition. The gain parameter of the all-sky imaging camera is then increased to a preset high-gain value for nighttime, so that it continuously acquires M frames of sky images in a high-gain state from the moment it enters the low-light condition, generating a time-aligned original image sequence. The acquisition time interval between adjacent frames in the M frames of sky images is equal. Step 2: Using the middle frame of the original image sequence as a reference, spatial registration is performed on the remaining frames respectively. The exposure time of each frame is read synchronously, and the pixel brightness of each frame after registration is uniformly scaled to the same exposure reference to obtain an aligned image sequence. Step 3: Based on the aligned image sequence, extract the temporal brightness value vector at each pixel position, obtain a frame of denoised synthetic sky image through adaptive mean synthesis method, and perform binary classification of clouds and sky on a pixel-by-pixel basis on the synthetic sky image, count the proportion of cloud pixels to all effective sky pixels, and output the sky cloud amount value.
[0005] As a further aspect of the present invention, the specific operation for screening available observation points is as follows: Install an all-sky imaging camera at the candidate observation point, with the optical axis pointing vertically to the zenith. Use a rangefinder to measure the horizontal distance between the candidate observation point and each of the surrounding protruding features, and use a goniometer to measure the elevation angle of the highest point of each protruding feature relative to the candidate observation point. If none of the protruding features are identified as suspicious obstacles, then the candidate observation point is listed as a point to be measured. The specific rules for identifying a protruding feature as a suspicious obstacle are as follows: for each protruding feature, if the elevation angle exceeds 5°, then its horizontal distance is further judged; if the horizontal distance is less than the projection length of the slant distance between the rangefinder and the highest point of the feature on the horizontal plane, then the protruding feature is identified as a suspicious obstacle. A fixed all-sky imaging camera was installed at the test point, and two consecutive sky images were collected during a cloudless daytime period, with the time interval between the two images being no less than 10 minutes. The first and second frame images are converted into grayscale images, and several consecutive dark areas corresponding to each are extracted. All consecutive dark areas of the two frames are paired one by one to mark fixed occlusions. Usable observation points are selected based on the coverage area of all fixed occlusions.
[0006] As a further aspect of the present invention, the specific rules for extracting corresponding continuous dark areas from an image are as follows: Calculate the difference between the gray value of each pixel and the average gray value of the entire image, and mark pixels whose difference exceeds 30% of the average gray value of the entire image as dark pixels; Traverse all pixels marked as dark pixels, and merge dark pixels that satisfy the eight-neighbor adjacency relationship into the same connected region. Each connected region is a continuous dark area. The eight-neighbor adjacency relationship refers to two dark pixels being adjacent pixels in any of the eight directions: up, down, left, right, upper left, upper right, lower left, and lower right.
[0007] As a further aspect of the present invention, the specific rule for pairing all consecutive dark areas in two frames of images one by one is as follows: for each consecutive dark area to be determined in the first frame of the image, find the consecutive dark area in the second frame that is closest to its centroid coordinates. If the closest distance does not exceed 10% of the length of the short side of the smallest bounding rectangle of the consecutive dark area to be determined, then the two consecutive dark areas are determined to be corresponding instances of the same dark area in the two frames of the image, and the corresponding instance is marked as a fixed occlusion.
[0008] As a further aspect of the present invention, the specific steps for selecting usable observation points based on the coverage area of all fixed obstructions are as follows: From the corresponding instances of the fixed occluder in two frames of images that have been recorded, the continuous dark area contour corresponding to one of the frames is selected as the reference contour of the fixed occluder. The total number of pixels covered by the reference contour is the covered pixels of the fixed occluder. Determine the covered pixels corresponding to all recorded fixed occlusions, and take the union of all covered pixels to obtain the total occlusion pixel set. Count the number of pixels in the total occlusion pixel set. Divide the total number of pixels in the total set of occluded pixels by the total number of effective pixels in the sky to obtain the occlusion area percentage: if the percentage does not exceed 8%, the candidate observation point is determined to be an available observation point; otherwise, it is determined to be an unavailable observation point. The term "all-sky effective pixels" refers to the total number of pixels within a circular effective sky area defined by taking the entire rectangular image captured by the all-sky imaging camera, with the geometric center of the rectangular image as the center and the shortest distance from the center to the four sides of the image as the radius.
[0009] As a further aspect of the present invention, the specific operation of spatial registration for each frame image is as follows: Calculate gradient magnitude maps for the intermediate frame and the Kth frame image to be registered respectively. Scan the gradient magnitude map pixel by pixel with a sliding window of a preset size. Extract the pixel with the largest gradient magnitude in each window as the candidate control point of that window, and obtain the candidate control point set of the intermediate frame and the candidate control point set of the Kth frame. For two candidate control point sets, take the neighboring image blocks as the center of each control point, calculate the normalized cross-correlation coefficient of any two neighboring image blocks between the two frames, and record the control point pairs whose cross-correlation coefficient exceeds the preset matching threshold as the same point pair. Based on the obtained pairs of corresponding points, a set of affine transformation equations between the intermediate frame and the Kth frame is constructed, and the least squares method is used to solve the affine transformation parameter matrix. Based on the obtained affine transformation parameter matrix, reverse mapping is performed on the Kth frame image to be registered, and its corresponding position in the intermediate frame coordinate system is calculated pixel by pixel. Bilinear interpolation is used to fill pixel values to complete spatial registration from the Kth frame to the intermediate frame. The above operation is repeated for all frames to be registered except the intermediate frame until all frame images are registered.
[0010] As a further aspect of the present invention, the specific rules for filling pixel values using bilinear interpolation are as follows: Calculate the corresponding position of each pixel in the coordinate system of the intermediate frame. If the corresponding position happens to fall on the integer pixel coordinate of the intermediate frame, then directly take the brightness value of the integer pixel as the fill value of the current pixel. If the corresponding position falls on a non-integer coordinate in the middle frame, then take the brightness value of the four nearest integer pixels around that position, first perform a linear interpolation on the upper and lower rows in the horizontal direction, and then perform a linear interpolation on the results of the two horizontal interpolations in the vertical direction. The final interpolation result is used as the fill value of the current pixel.
[0011] As a further aspect of the present invention, the specific content of the adaptive mean synthesis method is as follows: For each pixel location, calculate the arithmetic mean of all elements in its temporal luminance value vector and use it as the temporal mean of the pixel. At the same time, calculate the absolute value of the luminance difference between each pair of elements in the adjacent frame sequence of the vector and use the average of these absolute values as the temporal fluctuation of the pixel. The temporal fluctuation is compared with a preset fluctuation threshold: if the temporal fluctuation is lower than the fluctuation threshold, the temporal mean of the pixel is used as its denoised brightness value; if the temporal fluctuation is not lower than the fluctuation threshold, the brightness value corresponding to the intermediate frame is found from the temporal brightness value vector and used as the denoised brightness value of the pixel. Perform the above operations on all pixel locations and write the results to the same coordinates of a blank image frame to generate a denoised synthetic sky image.
[0012] As a further aspect of the present invention, the specific operation for performing the binary classification of clouds and sky is as follows: A circular effective sky region is defined with the geometric center of the synthesized sky image as the center and the shortest distance from the center to the four sides of the image as the radius. Pixels outside this region are not involved in subsequent processing. Within the circular effective sky area, with the center of the circle as the common center, the radius is divided into several equal segments along the radial direction, and concentric circles are drawn with the distance from each segment point to the center of the circle as the radius, thus dividing the circular effective sky area into several concentric ring partitions of equal width. For each annular partition, the average brightness of all pixels within the partition is calculated and used as the reference brightness of the sky background for that partition. Calculate the relative deviation between the brightness value of each pixel and the reference brightness of the sky background of its ring-shaped partition: if the relative deviation exceeds the preset discrimination threshold, the pixel is determined to be a cloud pixel; otherwise, the pixel is determined to be a sky pixel.
[0013] This invention provides a high-precision sky cloud cover detection device for performing the high-precision sky cloud cover detection method.
[0014] This invention provides a high-precision method and device for detecting cloud cover, which has the following advantages compared with the prior art: (1) This invention establishes a standard available observation point screening system. Suspicious obstacles are initially screened by the joint determination of the elevation angle and horizontal distance of ground objects. Then, the occlusion ratio of fixed occluders is identified by pairing continuous dark areas of multiple frames of images, thus eliminating the cloud cover error caused by fixed occlusion from the source. (2) The present invention uses an ambient light sensor and an all-sky imaging camera as dual data sources to jointly determine low light conditions, effectively filtering out occasional anomalies from a single data source, and using the intermediate frame as a reference for spatial registration to eliminate error accumulation. At the same time, it unifies the exposure reference of each frame, making the brightness of multiple frames physically comparable. (3) The present invention uses an adaptive mean synthesis method for temporal denoising, which preserves the edge details of moving clouds while suppressing noise, and calculates the baseline brightness of the sky background through concentric ring partitions, which solves the problem of uneven global threshold classification accuracy and significantly improves the accuracy of cloud and sky binary classification. Attached Figure Description
[0015] Figure 1 This is a flowchart of the steps of the present invention; Figure 2 This is a flowchart illustrating the steps involved in selecting available observation points according to the present invention. Figure 3 This is a cross-sectional view of the high-precision cloud cover detection device of the present invention; Figure 4 This is a perspective view of the high-precision cloud cover detection device of the present invention; Figure 5 This is a bottom view of the high-precision cloud cover detection device of the present invention; In the diagram: 1. Housing; 2. Main control circuit; 3. Imaging unit; 4. Environmental detection unit; 5. Dust accumulation detection unit; 6. Heating and defrosting unit; 7. Satellite receiving antenna; 8. Level bubble; 9. North indicator; 10. Mounting base; 11. Leveling bolt; 12. Fixing hole; 13. Power connector; 14. Data connector; 15. Status indicator light; 16. Gyroscope and electronic compass; 17. Satellite positioning and time synchronization unit. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] like Figure 1 This invention provides a high-precision method for detecting cloud cover in the sky; As an embodiment of this application, it includes: Step 1: Deploy an ambient light sensor and an all-sky imaging camera at available observation points. When the readings of the ambient light sensor are all below the illuminance threshold for N consecutive sampling periods, and the average gray value of the current frame image acquired by the all-sky imaging camera falls into the low illuminance range, the system is determined to have entered a low-light condition. The gain parameter of the all-sky imaging camera is then increased to a preset high-gain value for nighttime, so that it continuously acquires M frames of sky images in a high-gain state from the moment it enters the low-light condition, generating a time-aligned original image sequence. The acquisition time interval between adjacent frames in the M frames of sky images is equal. Step 2: Using the middle frame of the original image sequence as a reference, spatial registration is performed on the remaining frames respectively. The exposure time of each frame is read synchronously, and the pixel brightness of each frame after registration is uniformly scaled to the same exposure reference to obtain an aligned image sequence. Step 3: Based on the aligned image sequence, extract the temporal brightness value vector at each pixel position, obtain a frame of denoised synthetic sky image through adaptive mean synthesis method, and perform binary classification of clouds and sky on a pixel-by-pixel basis on the synthetic sky image, count the proportion of cloud pixels to all effective sky pixels, and output the sky cloud amount value.
[0018] As a second embodiment of this application, it is implemented based on the first embodiment, except that this embodiment includes: Step 1: Deploy ambient light sensors and all-sky imaging cameras at available observation points; All-sky imaging cameras must cover the entire 180° sky hemisphere above the horizon. If there are buildings, trees or other prominent features around the observation point, they will form fixed outlines with brightness differences from the sky background in the actual image. These outlines will make the cloud pixel count artificially high, resulting in a systematically larger cloud cover value. By using a preliminary screening process for available observation points, this source of error can be eliminated at its source. When the ambient light sensor readings are all below the illuminance threshold for N consecutive sampling periods, and the average gray value of the current frame image captured by the all-sky imaging camera falls into the low illuminance range, the system is determined to enter a low light condition. The illuminance threshold and the low illuminance range are both preset. An ambient light sensor is an independent physical quantity measurement device used to directly measure the downward irradiance of the sky and can provide an objective reference for changes in light. However, there is a possibility that the light sensor may be partially blocked, such as by bird droppings or fallen leaves covering the photosensitive window. In this case, its reading will be abnormally low, while the actual sky is still bright. If only the reading of the light sensor is used as the standard, the system will incorrectly adjust the gain parameter during the day, resulting in severe overexposure of the image. The average gray value of the current frame image captured by the all-sky imaging camera is the true feedback of the imaging system to the lighting conditions. However, the camera's automatic exposure algorithm may adjust the exposure parameters due to the appearance of large areas of dark or bright clouds in the picture, causing the average gray value to deviate from the normal range temporarily. At this time, it does not mean that the ambient light has dropped to the point where the gain parameters need to be adjusted. If both of the above conditions are met, it means that the independent sensor and imaging system jointly confirm that the illumination has dropped to the preset low illumination level, which can filter out occasional anomalies from a single data source and make the determination of low illumination conditions accurate and reliable. The value of N is the sampling frequency of the ambient light sensor multiplied by the preset minimum duration and then rounded up. The preset minimum duration is not less than 3 seconds. The gain parameter of the all-sky imaging camera is increased to a preset high gain value for nighttime, so that it continuously acquires M frames of sky images in high gain state from the start of low light conditions, generating a time-aligned original image sequence, wherein the acquisition time interval between adjacent frames in the M frames of sky images is equal. Using a preset high gain value for nighttime instead of real-time dynamic adjustment is to ensure that the gain parameter remains constant during continuous M-frame acquisition, so as to lock the consistency of the signal amplification factor from the source and make the physical parameters of the entire acquisition sequence traceable.
[0019] Step 2: Using the middle frame of the original image sequence as a reference, perform spatial registration on each of the remaining frames. Each frame in the original image sequence has a small spatial offset relative to its adjacent frames. If the first or last frame is taken as the reference, the frame farthest from the reference needs to be transformed multiple times to be aligned. The small estimation error in each transformation will accumulate step by step, resulting in a significant misalignment between the first and last frames. By using the intermediate frame as a reference, the transformation parameters of each other frame are directly calculated with the intermediate frame, skipping the error propagation of the intermediate links, so that the maximum error is controlled within the minimum range. Specifically, if M is odd, the intermediate frame is the image with acquisition sequence number (M+1) / 2; if M is even, the intermediate frame is the image with acquisition sequence number M / 2. The specific operation of spatial registration for each frame of image is as follows: Calculate gradient magnitude maps for the intermediate frame and the Kth frame image to be registered respectively. Scan the gradient magnitude map pixel by pixel with a sliding window of a preset size. Extract the pixel with the largest gradient magnitude in each window as the candidate control point of that window, and obtain the candidate control point set of the intermediate frame and the candidate control point set of the Kth frame. The specific calculation method for the gradient magnitude map is as follows: For each pixel in the image, calculate its brightness change in the horizontal and vertical directions respectively; Squaring the changes in both directions and summing them, then taking the square root, the result is the gradient magnitude of that pixel. The horizontal change is obtained by subtracting the brightness value of the left adjacent pixel from the brightness value of the right adjacent pixel of the pixel. The vertical change is obtained by subtracting the brightness value of the adjacent pixel above from the brightness value of the pixel below it. For two candidate control point sets, take the neighboring image blocks as the center of each control point, calculate the normalized cross-correlation coefficient of any two neighboring image blocks between the two frames, and record the control point pairs whose cross-correlation coefficient exceeds the preset matching threshold as the same point pair. The neighborhood image block refers to a small local image that is cropped out as a square by extending a predetermined number of pixels upwards, downwards, leftwards, and rightwards from the pixel coordinates of the control point. The specific operation for the normalized cross-correlation coefficient of any two neighboring image blocks between two frames is as follows: Calculate the average pixel brightness of the neighboring image block A of a certain control point in the intermediate frame and the neighboring image block B of a certain candidate control point in the frame to be registered. Subtract the mean of A from the brightness value of each pixel in the neighboring image block A to obtain the mean-reduced image block of A. Similarly, perform the same operation on the neighboring image block B to obtain the mean-reduced image block of B. Multiply the corresponding pixel values in the two mean-reduced image blocks A and B one by one and sum them up. At the same time, calculate the sum of squares of all pixel values in each of the two mean-reduced image blocks A and B, and multiply the two sums of squares and take the square root as the normalized denominator. Dividing the product by the denominator yields the normalized cross-correlation coefficient, which ranges from -1 to 1. The closer it is to 1, the more similar the texture patterns of the two neighboring image patches are, and the more likely the two corresponding control points are to be the same physical location in the two frames. Based on the obtained pairs of corresponding points, a set of affine transformation equations between the intermediate frame and the Kth frame is constructed, and the least squares method is used to solve the affine transformation parameter matrix. Based on the obtained affine transformation parameter matrix, reverse mapping is performed on the Kth frame image to be registered, and its corresponding position in the intermediate frame coordinate system is calculated pixel by pixel. The above method transforms all images to be registered into a coordinate system based on the intermediate frame by solving the affine transformation parameter matrix. This method is an existing technology, and its specific solution and transformation methods will not be elaborated here. Bilinear interpolation is used to fill pixel values to complete spatial registration from the Kth frame to the intermediate frame. The above operation is repeated for all frames to be registered except the intermediate frame until all frames are registered. The specific rules for filling pixel values using bilinear interpolation are as follows: Calculate the corresponding position of each pixel in the coordinate system of the intermediate frame. If the corresponding position happens to fall on the integer pixel coordinate of the intermediate frame, then directly take the brightness value of the integer pixel as the fill value of the current pixel. If the corresponding position falls on a non-integer coordinate in the middle frame, then take the brightness value of the four nearest integer pixels around the position, first perform a linear interpolation on the upper and lower rows in the horizontal direction, and then perform a linear interpolation on the result of the two horizontal interpolations in the vertical direction. The final interpolation result is used as the fill value of the current pixel. The exposure time of each frame is read synchronously, and the pixel brightness of each frame after registration is uniformly scaled to the same exposure reference to obtain an aligned image sequence. The specific operation is as follows: Read the actual exposure time recorded when each frame of the image is acquired, and select the minimum value from the exposure times of all M frames as the reference exposure time; Calculate the ratio of the actual exposure time to the reference exposure time for each frame, and multiply the brightness value of each pixel in that frame by the ratio to obtain the brightness-scaled pixel value of that frame; After all frames have been processed, the output is a sequence of aligned images with normalized brightness.
[0020] Step 3: Based on the aligned image sequence, extract the temporal brightness value vector at each pixel location, and obtain a denoised synthetic sky image by using the adaptive mean synthesis method. The temporal brightness value vector specifically refers to a one-dimensional array formed by fixing a certain pixel coordinate position in the output aligned image sequence, extracting the brightness value of that position in each frame according to the order of frame acquisition, and arranging these brightness values. The specific details of the adaptive mean synthesis method are as follows: For each pixel location, calculate the arithmetic mean of all elements in its temporal luminance value vector and use it as the temporal mean of the pixel. At the same time, calculate the absolute value of the luminance difference between each pair of elements in the adjacent frame sequence of the vector and use the average of these absolute values as the temporal fluctuation of the pixel. The temporal fluctuation is compared with a preset fluctuation threshold: if the temporal fluctuation is lower than the fluctuation threshold, the temporal mean of the pixel is used as its denoised brightness value; if the temporal fluctuation is not lower than the fluctuation threshold, the brightness value corresponding to the intermediate frame is found from the temporal brightness value vector and used as the denoised brightness value of the pixel. Perform the above operations on all pixel locations and write the results to the same coordinates of a blank frame image to generate a denoised synthetic sky image; The synthesized sky image is subjected to pixel-by-pixel binary classification of clouds and sky. The specific operation is as follows: A circular effective sky region is defined with the geometric center of the synthesized sky image as the center and the shortest distance from the center to the four sides of the image as the radius. Pixels outside this region are not involved in subsequent processing. Within the circular effective sky area, with the center of the circle as the common center, the radius is divided into several equal segments along the radial direction, and concentric circles are drawn with the distance from each segment point to the center of the circle as the radius, thus dividing the circular effective sky area into several concentric ring partitions of equal width. For each annular partition, the average brightness of all pixels within the partition is calculated and used as the reference brightness of the sky background for that partition. Calculate the relative deviation between the brightness value of each pixel and the reference brightness of the sky background of its ring-shaped partition: if the relative deviation exceeds the preset discrimination threshold, the pixel is determined to be a cloud pixel; otherwise, the pixel is determined to be a sky pixel. The percentage of cloud pixels out of all valid sky pixels is the output cloud cover value.
[0021] As a third embodiment of this application, this embodiment further discloses a method for screening available observation points based on embodiments one and two, such as... Figure 2 As shown, the specific content includes: Install the all-sky imaging camera (temporarily) at the alternative observation point (preset), with the optical axis pointing vertically to the zenith. Use a rangefinder to measure the horizontal distance between the alternative observation point and each prominent feature (such as trees, buildings, etc.) in the surrounding area. At the same time, use a goniometer to measure the elevation angle of the highest point of each prominent feature relative to the alternative observation point. For each protruding feature, if the elevation angle exceeds 5°, its horizontal distance is further determined: if the horizontal distance is less than the projected length of the slant distance between the rangefinder and the highest point of the feature on the horizontal plane, the feature is determined to be a suspicious obstacle. If no prominent features are identified as suspicious obstacles, the candidate observation point will be listed as a point to be measured. A fixed all-sky imaging camera was installed at the test point, and two consecutive sky images were collected during a cloudless daytime period, with the time interval between the two images being no less than 10 minutes. The first and second frame images are converted into grayscale images, and several consecutive dark areas corresponding to each are extracted. The specific rules for extracting corresponding consecutive dark areas from an image are as follows: Calculate the difference between the gray value of each pixel and the average gray value of the entire image, and mark pixels whose difference exceeds 30% of the average gray value of the entire image as dark pixels; Traverse all pixels marked as dark pixels, and merge dark pixels that satisfy the eight-neighbor adjacency relationship into the same connected region. Each connected region is a continuous dark area. The eight-neighbor adjacency relationship refers to two dark pixels being adjacent pixels in any of the eight directions: up, down, left, right, upper left, upper right, lower left, and lower right. The process involves pairing all consecutive dark areas between two frames to identify fixed occluders. The specific steps are as follows: For each continuous dark area to be determined in the first frame image, find the continuous dark area in the second frame that is closest to its centroid coordinates. If the closest distance does not exceed 10% of the length of the short side of the smallest bounding rectangle of the continuous dark area to be determined, then the two continuous dark areas are determined to be the corresponding instances of the same dark area in the two frames image, and the corresponding instance is marked as a fixed occlusion. Available observation points were selected based on the coverage areas of all fixed obstructions. The specific steps are as follows: From the corresponding instances of the fixed occluder in the two frames of images, select the continuous dark area contour corresponding to one of the frames (preferably the frame with a more uniform sky background and no transient interference) as the reference contour of the fixed occluder. The total number of pixels covered by the reference contour is the coverage pixels of the fixed occluder. Determine the covered pixels corresponding to all recorded fixed occlusions, and take the union of all covered pixels to obtain the total occlusion pixel set. Count the number of pixels in the total occlusion pixel set. Divide the total number of pixels in the total set of occluded pixels by the total number of effective pixels in the sky to obtain the occlusion area percentage: if the percentage does not exceed 8%, the candidate observation point is determined to be an available observation point; otherwise, it is determined to be an unavailable observation point. The term "all-sky effective pixels" refers to the total number of pixels within a circular effective sky area defined by taking the entire rectangular image captured by the all-sky imaging camera, with the geometric center of the rectangular image as the center and the shortest distance from the center to the four sides of the image as the radius.
[0022] As a fourth embodiment of this application, the present invention provides a high-precision cloud cover detection device, such as... Figure 3 , Figure 4 , Figure 5 As shown, it includes a shell 1, which consists of an outer shell and an inner shell, with a gap between the outer shell and the inner shell; The inner shell encapsulates the main control circuit 2, imaging unit 3, dust accumulation detection unit 5 and satellite receiving antenna 7, which serve to seal and waterproof. A heating defrosting unit 6 is installed at the bottom between the outer shell and the inner shell. The lower part of the inner casing contains an environmental detection unit 4, a power connector 13, a data connector 14, and a status indicator light 15. The outer casing has a hollowed-out shape around the imaging unit 3 and the dust accumulation detection unit 5, and is shaped like a fairing. This guides the heated airflow generated by the heating defrosting unit 6 through the fairing to flow over the surface of each imaging unit 3 and the dust accumulation detection unit 5, thereby heating the surface of the lens and the dust accumulation detection unit to prevent frost, ice and snow from forming on the surface. The outer casing is also equipped with a level bubble 8 and a north indicator 9. The surface of the outer casing is milky white, which can reflect sunlight and play a role in sun protection, reducing the risk of components overheating due to sun exposure. The upper part of the mounting base 10 is connected to the bottom of the inner shell, serving to support the equipment; The mounting base 10 has a fixing disc at the bottom with leveling bolts 11 and fixing holes 12 for leveling and fixing the equipment. The heating and defrosting unit 6 is a module with heating function, such as a PI, PTC, PET or silicone heating film. It can be attached around the imaging unit 3, the dust accumulation detection unit 5 and other related detection devices, as well as the outer and inner surfaces of the housing, to prevent the imaging unit and the detection unit from frosting, icing and accumulating snow. The main control circuit 2 serves as the main controller for the imaging unit 3, the environmental detection unit 4, the dust accumulation detection unit 5, etc., and processes and transmits the collected data throughout the entire working sequence and process of the high-precision cloud cover detection device. The main control circuit 2 includes an onboard gyroscope and electronic compass 16, a satellite positioning and time synchronization unit 17, and has functions such as real-time detection and automatic recording of system tilt angle and azimuth angle, as well as time synchronization. The imaging unit 3 consists of a lens and a multispectral or hyperspectral camera. Multiple imaging units can be in the same detection band, forming a wider field of view during observation; multiple imaging units can also be in different detection bands to expand the detection capabilities of the device. The environmental detection unit 4 can be equipped with sensors for temperature, humidity, air pressure, etc., or other environmental measurement elements (such as precipitation) can be added as needed. It can be directly installed on the lower part of the outer shell, or connected to other meteorological sensors through an interface for real-time detection of the external environment and transmission to the main controller for heating control or other related data processing. The dust accumulation detection unit 5 can be a panel dust accumulation sensor, used to detect the degree of dust accumulation on the equipment. When a certain threshold is reached, an early warning is issued to notify maintenance personnel to clean the equipment.
[0023] Some of the data in the above formulas are numerical calculations with dimensions removed, and the contents not described in detail in this specification are all prior art known to those skilled in the art.
[0024] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A high-precision method for detecting cloud cover, characterized in that, include: Step 1: Deploy an ambient light sensor and an all-sky imaging camera at available observation points. When the readings of the ambient light sensor are all below the illuminance threshold for N consecutive sampling periods, and the average gray value of the current frame image acquired by the all-sky imaging camera falls into the low illuminance range, the system is determined to have entered a low-light condition. The gain parameter of the all-sky imaging camera is then increased to a preset high-gain value for nighttime, so that it continuously acquires M frames of sky images in a high-gain state from the moment it enters the low-light condition, generating a time-aligned original image sequence. The acquisition time interval between adjacent frames in the M frames of sky images is equal. Step 2: Using the middle frame of the original image sequence as a reference, spatial registration is performed on the remaining frames respectively. The exposure time of each frame is read synchronously, and the pixel brightness of each frame after registration is uniformly scaled to the same exposure reference to obtain an aligned image sequence. Step 3: Based on the aligned image sequence, extract the temporal brightness value vector at each pixel location. Obtain a denoised synthetic sky image using an adaptive mean synthesis method. Perform binary classification of clouds and sky pixel by pixel on this synthetic sky image, calculate the proportion of cloud pixels to all effective sky pixels, and output the cloud cover value. The specific operation of performing binary classification of clouds and sky is as follows: Using the geometric center of the synthetic sky image as the center and the shortest distance from the center to the four sides of the image as the radius, delineate a circular effective sky region. Pixels outside this region are not included in subsequent processing. Within the circular effective sky area, the radius is divided into several equal segments with the center of the circle as the common center. Concentric circles are drawn with the distance from each segment point to the center as the radius, dividing the circular effective sky area into several concentric annular partitions of equal width. For each annular partition, the average brightness of all pixels in the area is calculated and used as the reference brightness of the sky background of that partition. The relative deviation between the brightness value of each pixel and the reference brightness of the sky background of its annular partition is calculated. If the relative deviation exceeds a preset discrimination threshold, the pixel is determined to be a cloud pixel; otherwise, the pixel is determined to be a sky pixel.
2. The high-precision cloud cover detection method according to claim 1, characterized in that, The specific steps for filtering available observation points are as follows: Install an all-sky imaging camera at the candidate observation point, with the optical axis pointing vertically to the zenith. Use a rangefinder to measure the horizontal distance between the candidate observation point and each of the surrounding protruding features, and use a goniometer to measure the elevation angle of the highest point of each protruding feature relative to the candidate observation point. If none of the protruding features are identified as suspicious obstacles, then the candidate observation point is listed as a point to be measured. The specific rules for identifying a protruding feature as a suspicious obstacle are as follows: for each protruding feature, if the elevation angle exceeds 5°, then its horizontal distance is further judged; if the horizontal distance is less than the projection length of the slant distance between the rangefinder and the highest point of the feature on the horizontal plane, then the protruding feature is identified as a suspicious obstacle. A fixed all-sky imaging camera was installed at the test point, and two consecutive sky images were collected during a cloudless daytime period, with the time interval between the two images being no less than 10 minutes. The first and second frame images are converted into grayscale images, and several consecutive dark areas corresponding to each are extracted. All consecutive dark areas of the two frames are paired one by one to mark fixed occlusions. Usable observation points are selected based on the coverage area of all fixed occlusions.
3. The high-precision cloud cover detection method according to claim 2, characterized in that, The specific rules for extracting corresponding consecutive dark areas from an image are as follows: Calculate the difference between the gray value of each pixel and the average gray value of the entire image, and mark pixels whose difference exceeds 30% of the average gray value of the entire image as dark pixels; Traverse all pixels marked as dark pixels, and merge dark pixels that satisfy the eight-neighbor adjacency relationship into the same connected region. Each connected region is a continuous dark area. The eight-neighbor adjacency relationship refers to two dark pixels being adjacent pixels in any of the eight directions: up, down, left, right, upper left, upper right, lower left, and lower right.
4. The high-precision cloud cover detection method according to claim 2, characterized in that, The specific rule for pairing all consecutive dark areas in two frames of images is as follows: For each consecutive dark area to be determined in the first frame of the image, find the consecutive dark area in the second frame that is closest to its centroid coordinates. If the closest distance does not exceed 10% of the length of the short side of the smallest bounding rectangle of the consecutive dark area to be determined, then the two consecutive dark areas are determined to be the corresponding instances of the same dark area in the two frames of the image, and the corresponding instance is marked as a fixed occlusion.
5. The high-precision cloud cover detection method according to claim 2, characterized in that, The specific steps for selecting usable observation points based on the coverage area of all fixed obstructions are as follows: From the corresponding instances of the fixed occluder in two frames of images that have been recorded, the continuous dark area contour corresponding to one of the frames is selected as the reference contour of the fixed occluder. The total number of pixels covered by the reference contour is the covered pixels of the fixed occluder. Determine the covered pixels corresponding to all recorded fixed occlusions, and take the union of all covered pixels to obtain the total occlusion pixel set. Count the number of pixels in the total occlusion pixel set. Divide the total number of pixels in the total set of occluded pixels by the total number of effective pixels in the sky to obtain the occlusion area percentage: if the percentage does not exceed 8%, the candidate observation point is determined to be an available observation point; otherwise, it is determined to be an unavailable observation point. The term "all-sky effective pixels" refers to the total number of pixels within a circular effective sky area defined by taking the entire rectangular image captured by the all-sky imaging camera, with the geometric center of the rectangular image as the center and the shortest distance from the center to the four sides of the image as the radius.
6. The high-precision cloud cover detection method according to claim 1, characterized in that, The specific steps for spatial registration of each frame are as follows: Calculate gradient magnitude maps for the intermediate frame and the Kth frame image to be registered respectively. Scan the gradient magnitude map pixel by pixel with a sliding window of a preset size. Extract the pixel with the largest gradient magnitude in each window as the candidate control point of that window, and obtain the candidate control point set of the intermediate frame and the candidate control point set of the Kth frame. For two candidate control point sets, take the neighboring image blocks as the center of each control point, calculate the normalized cross-correlation coefficient of any two neighboring image blocks between the two frames, and record the control point pairs whose cross-correlation coefficient exceeds the preset matching threshold as the same point pair. Based on the obtained pairs of corresponding points, a set of affine transformation equations between the intermediate frame and the Kth frame is constructed, and the least squares method is used to solve the affine transformation parameter matrix. Based on the obtained affine transformation parameter matrix, reverse mapping is performed on the Kth frame image to be registered, and its corresponding position in the intermediate frame coordinate system is calculated pixel by pixel. Bilinear interpolation is used to fill pixel values to complete spatial registration from the Kth frame to the intermediate frame. The above operation is repeated for all frames to be registered except the intermediate frame until all frame images are registered.
7. The high-precision cloud cover detection method according to claim 6, characterized in that, The specific rules for filling pixel values using bilinear interpolation are as follows: Calculate the corresponding position of each pixel in the coordinate system of the intermediate frame. If the corresponding position happens to fall on the integer pixel coordinate of the intermediate frame, then directly take the brightness value of the integer pixel as the fill value of the current pixel. If the corresponding position falls on a non-integer coordinate in the middle frame, then take the brightness value of the four nearest integer pixels around that position, first perform a linear interpolation on the upper and lower rows in the horizontal direction, and then perform a linear interpolation on the results of the two horizontal interpolations in the vertical direction. The final interpolation result is used as the fill value of the current pixel.
8. The high-precision cloud cover detection method according to claim 1, characterized in that, The specific details of the adaptive mean synthesis method are as follows: For each pixel location, calculate the arithmetic mean of all elements in its temporal luminance value vector and use it as the temporal mean of the pixel. At the same time, calculate the absolute value of the luminance difference between each pair of elements in the adjacent frame sequence of the vector and use the average of these absolute values as the temporal fluctuation of the pixel. The temporal fluctuation is compared with a preset fluctuation threshold: if the temporal fluctuation is lower than the fluctuation threshold, the temporal mean of the pixel is used as its denoised brightness value. If the temporal fluctuation is not lower than the fluctuation threshold, then find the brightness value corresponding to the intermediate frame from the temporal brightness value vector and use it as the brightness value of the pixel after denoising. Perform the above operations on all pixel locations and write the results to the same coordinates of a blank image frame to generate a denoised synthetic sky image.
9. A high-precision cloud cover detection device, characterized in that, Used to perform the high-precision cloud cover detection method according to any one of claims 1-8.
Citation Information
Patent Citations
Ground-based all-sky image cloud cover calculation method and system
CN117409020A
Dynamic scene adaptive exposure regulation and control method for visible light imaging product
CN121940648A