Cloud layer segmentation method and apparatus, and electronic device

Through adaptive threshold generation and multi-level processing methods, the accuracy of traditional cloud segmentation under light changes and complex cloud structures is solved, and efficient and flexible cloud segmentation effect is achieved.

CN120336560AActive Publication Date: 2025-07-18TIANHE TRAILBLAZER PHOTOVOLTAIC STENT (JIANGSU CHANGZHOU) CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510823592.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-07-18
Estimated Expiration
2045-06-19

AI Technical Summary

Technical Problem

The traditional cloud segmentation method is not effective when the light changes are large or the cloud structure is complex. The deep learning-based method is costly and relies on a large amount of labeled data.

Method used

Adaptive threshold generation method and multi-level processing method are used to generate a threshold matrix based on the global brightness histogram and local comparison characteristics of the target cloud map, decompose it into multiple levels and apply different thresholds for cloud segmentation, and finally obtain the cloud segmented image through fusion.

Benefits of technology

It improves the accuracy and flexibility of cloud segmentation, can adapt to various complex cloud patterns, and achieve more comprehensive cloud detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336560A_ABST
    Figure CN120336560A_ABST
Patent Text Reader

Abstract

The invention provides a cloud layer segmentation method and device and electronic equipment, and the method comprises the steps: generating a threshold matrix according to a global brightness histogram and local comparison features of a target cloud picture; generating a strong light area segmentation threshold value and a weak light area segmentation threshold value according to the illumination intensity and the threshold value matrix; decomposing the target cloud picture into a plurality of hierarchies, and performing cloud layer segmentation on different hierarchies in the plurality of hierarchies by adopting a threshold matrix, a strong light region segmentation threshold and a weak light region segmentation threshold to obtain segmentation results corresponding to the different hierarchies; and fusing each segmentation result to obtain a cloud layer segmentation image. Based on the method, the accuracy and flexibility of cloud layer segmentation are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application mainly relates to the field of image processing technology, and in particular, to a method, apparatus, and electronic device for cloud segmentation. Background Art

[0002] In recent years, with the rapid development of remote sensing technology and computer vision, the field of cloud segmentation has received extensive attention. Traditional segmentation methods based on fixed thresholds have poor effects when the illumination changes greatly or the cloud structure is complex. With the introduction of deep learning technology, although the accuracy of image segmentation has been improved, deep learning-based methods usually rely on a large amount of labeled data and high-performance computing resources, which will bring higher cost. Summary of the Invention

[0003] To solve the above problems, the purpose of this application is to provide a method, apparatus, and electronic device for cloud segmentation.

[0004] In a first aspect, this application provides a method for cloud segmentation, the method including: Generating a threshold matrix according to the global brightness histogram and local contrast features of the target cloud image; Generating a strong light area segmentation threshold and a weak light area segmentation threshold according to the illumination intensity and the threshold matrix, where the strong light area segmentation threshold is less than the weak light area segmentation threshold; Decomposing the target cloud image into multiple levels, and respectively using the threshold matrix, the strong light area segmentation threshold, and the weak light area segmentation threshold to perform cloud segmentation on different levels in the multiple levels to obtain segmentation results corresponding to the different levels, where the image resolution of each level is different; Fusing each of the segmentation results to obtain a cloud segmentation image.

[0005] Optionally, the step of decomposing the target cloud image into multiple levels further includes: using the image pyramid technology to decompose the target cloud image into multiple levels, where the multiple levels include a first level, a second level, a third level, and a fourth level.

[0006] Optionally, the step of respectively using the threshold matrix, the strong light area segmentation threshold, and the weak light area segmentation threshold to perform cloud segmentation on different levels to obtain the segmentation results corresponding to different levels further includes: using the strong light area segmentation threshold to perform cloud segmentation on the fourth level to obtain a fourth-level segmentation result; using the weak light area segmentation threshold to perform cloud segmentation on the first level to obtain a first-level segmentation result; using the first medium threshold in the threshold matrix to perform cloud segmentation on the third level to obtain a third-level segmentation result, where the first medium threshold is greater than the strong light area segmentation threshold but less than the weak light area segmentation threshold; using the second medium threshold in the threshold matrix to perform cloud segmentation on the second level to obtain a second-level segmentation result, where the second medium threshold is less than the weak light area segmentation threshold but greater than the strong light area segmentation threshold.

[0007] Optionally, it further includes before fusing each of the segmentation results: applying morphological processing to each of the segmentation results, including: determining whether the cloud gap features in each of the segmentation results meet preset requirements; if they meet the preset requirements, performing closing operation processing on the segmentation result; if they do not meet the preset requirements, performing opening operation processing on the segmentation result, where the closing operation processing and the opening operation processing are different ways of the morphological processing respectively.

[0008] Optionally, the step of fusing each of the segmentation results to obtain a cloud segmentation image further includes: merging each of the segmentation results by using a logical OR operation or a weighted superposition method to obtain the cloud segmentation image.

[0009] Optionally, it further includes before generating the threshold matrix according to the global brightness histogram and local contrast features of the target cloud map: obtaining a ground-based cloud map; performing grayscale processing on the ground-based cloud map to obtain a grayscale image; performing image denoising on the grayscale image to obtain a denoised image; applying histogram equalization to the denoised image to obtain the target cloud map.

[0010] Optionally, it further includes after obtaining the cloud segmentation image: obtaining a key index based on the cloud segmentation image, where the key index is used to reflect the quality of the cloud segmentation image; when the key index does not reach the set value, adjusting the threshold matrix and / or the strong light area segmentation threshold and / or the weak light area segmentation threshold.

[0011] Optionally, the step of generating a threshold matrix according to the global brightness histogram and local contrast features of the target cloud map further includes: analyzing the global brightness histogram of the target cloud map to extract the overall brightness distribution features of the image and determine a basic threshold; dividing the target cloud map into multiple local sub-blocks, calculating the contrast of each local sub-block, and assigning a corresponding weight coefficient to each local sub-block according to the magnitude of the contrast; generating the threshold matrix according to the basic threshold, the contrast of each local sub-block, and the weight coefficient corresponding to each local sub-block.

[0012] Optionally, the step of generating a strong light area segmentation threshold and a weak light area segmentation threshold according to the illumination intensity and the threshold matrix further includes: selecting, according to the global brightness histogram, a pixel area that meets the first requirement in the brightness distribution as the strong light area, and selecting a pixel area that meets the second requirement in the brightness distribution as the weak light area, where the first requirement includes: the pixel value is greater than or equal to a first threshold, and the second requirement includes: the pixel value is less than or equal to a second threshold; multiplying the basic threshold in the threshold matrix by a first coefficient to obtain the strong light area segmentation threshold, where the strong light area segmentation threshold is less than the basic threshold; multiplying the basic threshold in the threshold matrix by a second coefficient to obtain the weak light area segmentation threshold, where the weak light area segmentation threshold is greater than the basic threshold.

[0013] The technical effects of the present application are specifically as follows: By adopting an adaptive threshold generation method, the segmentation threshold can be adjusted according to different illumination conditions, thereby ensuring the segmentation accuracy and improving the overall segmentation accuracy. The multi-level processing method enables the algorithm to optimize the segmentation for clouds of different sizes and small cloud gaps, can adapt to various complex cloud forms, and realizes more comprehensive cloud detection. By integrating the adaptive threshold generation method and the multi-level processing method, the accuracy and flexibility of cloud segmentation are effectively improved.

[0014] In a second aspect, the present application provides a cloud segmentation device, which is applied to the cloud segmentation method described in any item of the first aspect. The device includes: A threshold matrix generation module, configured to generate a threshold matrix according to the global brightness histogram and local contrast features of the target cloud map; A segmentation threshold generation module, configured to generate a strong light area segmentation threshold and a weak light area segmentation threshold according to the illumination intensity and the threshold matrix, where the strong light area segmentation threshold is less than the weak light area segmentation threshold; A segmentation module, which is used to decompose the target cloud map into multiple levels, and respectively perform cloud layer segmentation on different levels by using the threshold matrix, the strong light area segmentation threshold, and the weak light area segmentation threshold, so as to obtain segmentation results corresponding to different levels, where the image resolution of each level is different; A fusion module, which is used to fuse each segmentation result to obtain a cloud layer segmentation image.

[0015] Optionally, the segmentation module is further used to decompose the target cloud map into multiple levels by using the image pyramid technology, where the multiple levels include a first level, a second level, a third level, and a fourth level.

[0016] Optionally, the segmentation module is further used to perform cloud layer segmentation on the fourth level by using the strong light area segmentation threshold to obtain a fourth level segmentation result; perform cloud layer segmentation on the first level by using the weak light area segmentation threshold to obtain a first level segmentation result; perform cloud layer segmentation on the third level by using a first medium threshold in the threshold matrix to obtain a third level segmentation result, where the first medium threshold is greater than the strong light area segmentation threshold but less than the weak light area segmentation threshold; perform cloud layer segmentation on the second level by using a second medium threshold in the threshold matrix to obtain a second level segmentation result, where the second medium threshold is less than the weak light area segmentation threshold but greater than the strong light area segmentation threshold.

[0017] Optionally, the device is further used to apply morphological processing to each segmentation result, including: judging whether the cloud gap feature in each segmentation result meets a preset requirement; if it meets the preset requirement, performing closing operation processing on the segmentation result; if it does not meet the preset requirement, performing opening operation processing on the segmentation result, where the closing operation processing and the opening operation processing are different ways of the morphological processing respectively.

[0018] Optionally, the fusion module is further used to merge each segmentation result by using a logical OR operation or a weighted superposition method to obtain the cloud layer segmentation image.

[0019] Optionally, the device is further used to obtain a ground-based cloud map; perform grayscale processing on the ground-based cloud map to obtain a grayscale image; perform image denoising on the grayscale image to obtain a denoised image; apply histogram equalization to the denoised image to obtain the target cloud map.

[0020] Optionally, the device is further used to obtain key indicators based on the cloud layer segmentation image, where the key indicators are used to reflect the quality of the cloud layer segmentation image; when the key indicators do not reach the set value, adjust the threshold matrix and / or the strong light area segmentation threshold and / or the weak light area segmentation threshold.

[0021] Optionally, the threshold matrix generation module is further configured to analyze the global brightness histogram of the target cloud map to extract the overall brightness distribution characteristics of the image and determine a basic threshold; divide the target cloud map into multiple local sub-blocks, calculate the contrast of each local sub-block, and assign a corresponding weight coefficient to each local sub-block according to the magnitude of the contrast; generate the threshold matrix according to the basic threshold, the contrast of each local sub-block, and the weight coefficient corresponding to each local sub-block.

[0022] Optionally, the segmentation threshold generation module is further configured to select, according to the global brightness histogram, a pixel region that meets the first requirement in the brightness distribution as a strong light region, and select a pixel region that meets the second requirement in the brightness distribution as a weak light region, where the first requirement includes: the pixel value is greater than or equal to a first threshold, and the second requirement includes: the pixel value is less than or equal to a second threshold; multiply the basic threshold in the threshold matrix by a first coefficient to obtain the strong light region segmentation threshold, where the strong light region segmentation threshold is less than the basic threshold; multiply the basic threshold in the threshold matrix by a second coefficient to obtain the weak light region segmentation threshold, where the weak light region segmentation threshold is greater than the basic threshold.

[0023] In a third aspect, the present application provides an electronic device, where the electronic device includes: a memory for storing a computer program; a processor for implementing the method steps provided in the first aspect or the second aspect when executing the computer program stored on the memory.

[0024] In a fourth aspect, the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program implements the method steps provided in the first aspect or the second aspect when executed by a processor.

[0025] For the various aspects in the second aspect to the fourth aspect and the possible technical effects that each aspect may achieve, please refer to the possible technical effects that can be achieved by the first aspect or various possible solutions in the first aspect above, and details will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings are provided to provide a further understanding of the present application, and they are incorporated into and constitute a part of this application. The accompanying drawings illustrate embodiments of the present application and, together with this specification, serve to explain the principles of the present application. In the accompanying drawings: Figure 1 is a flowchart of a method for cloud layer segmentation provided by the present application; Figure 2It is a comparison chart of the segmentation results of different cloud layer segmentation methods provided by this application; Figure 3 It is a schematic diagram of a cloud layer segmentation device provided by this application; Figure 4 It is a schematic diagram of the structure of an electronic device provided by this application. Detailed implementation manners

[0027] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some examples or embodiments of this application. For those of ordinary skill in the art, without creative efforts, this application can also be applied to other similar scenarios based on these drawings. Unless obvious from the language context or otherwise stated, the same reference numerals in the figures represent the same structure or operation.

[0028] As shown in this application and the claims, unless the context clearly indicates an exception, words such as "a", "an", "one" and / or "the" are not specifically singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of the clearly identified steps and elements, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0029] Unless otherwise specifically stated, the relative arrangements, numerical expressions and values of the components and steps described in these embodiments do not limit the scope of this application. At the same time, it should be understood that for the sake of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to the actual proportional relationship. Technologies, methods and devices known to those of ordinary skill in the relevant field may not be discussed in detail, but where appropriate, the said technologies, methods and devices should be regarded as part of the authorized specification. In all the examples shown and discussed here, any specific value should be interpreted as merely exemplary and not as a limitation. Therefore, other examples of the exemplary embodiments may have different values. It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further discussed in the subsequent drawings.

[0030] In addition, it should be noted that the use of terms such as "first" and "second" to limit components is merely for the convenience of distinguishing the corresponding components. Without additional statements, the above terms have no special meanings, so they should not be construed as limiting the scope of protection of this application. In addition, although the terms used in this application are selected from well-known and commonly used terms, some of the terms mentioned in the specification of this application may be selected by the applicant according to his or her judgment, and their detailed meanings are described in the relevant parts of this description. In addition, it is required to understand this application not only through the actual terms used, but also through the meanings implied by each term.

[0031] Flowcharts are used in this application to illustrate the operations performed by the systems according to the embodiments of this application. It should be understood that the operations before or below do not necessarily need to be precisely executed in sequence. On the contrary, various steps can be executed in reverse order or simultaneously. At the same time, other operations can be added to these processes, or one or more steps can be removed from these processes.

[0032] See Figure 1 As shown, it is a flowchart of a cloud segmentation method provided by an embodiment of this application. The specific process is as follows: S101: Generate a threshold matrix according to the global brightness histogram and local contrast features of the target cloud map.

[0033] In the embodiment of this application, the target cloud map is a cloud map obtained by processing the ground-based cloud map. The specific process of obtaining the target cloud map is as follows: S201: Collect the ground-based cloud map. Through ground-based equipment, such as a sky imager, the ground-based cloud map is taken. The ground-based cloud map records the distribution, shape, and changes of clouds in real time.

[0034] S202: Perform grayscale processing on the ground-based cloud map to obtain a grayscale image. Converting the ground-based cloud map into a grayscale map can simplify the data structure and reduce the computational complexity. Grayscale processing helps to retain the brightness information and makes it more effective to distinguish clouds from the background in subsequent steps.

[0035] S203: Perform image denoising on the grayscale image to obtain a denoised image. Specifically, denoising techniques such as Gaussian filtering are used to smooth the image, remove noise interference, and retain the main cloud structure. Denoising the grayscale image can improve the clarity of the cloud boundaries and provide a cleaner input for subsequent segmentation steps.

[0036] S204: Apply histogram equalization to the denoised image to obtain the target cloud map. Applying histogram equalization to the denoised grayscale image can increase the image contrast and make the brightness difference between clouds and the background more obvious.

[0037] After obtaining the target cloud image, analyze the global brightness histogram of the target cloud image to extract the overall brightness distribution characteristics of the image and determine the basic threshold. The basic threshold includes an upper threshold and / or a lower threshold. For example, the basic threshold includes the lower threshold of the highlight area threshold and the upper threshold of the shadow area threshold.

[0038] Divide the target cloud image into multiple local sub-blocks, for example, divide it into 16×16 pixels, calculate the contrast of each local sub-block. The contrast is the difference between the maximum brightness and the minimum brightness, and assign a corresponding weight coefficient to each local sub-block according to the size of the contrast. For example, assign a finer threshold adjustment coefficient (i.e., weight coefficient) to the high-contrast sub-blocks and assign a fixed threshold to the low-contrast sub-blocks.

[0039] According to the determined basic threshold, the contrast of each local sub-block, and the weight coefficient corresponding to each local sub-block, generate a threshold matrix. In one embodiment, the formula for generating the threshold matrix is as follows:

[0040] Where, represents the basic threshold based on the global histogram, represents the local sub-block contrast, represents the contrast weight coefficient, represents the maximum contrast value of the whole image.

[0041] S102. Generate the strong light area segmentation threshold and the weak light area segmentation threshold according to the illumination intensity and the threshold matrix.

[0042] Specifically, according to the global brightness histogram, select the pixel area that meets the first requirement in the brightness distribution as the strong light area. The first requirement includes that the pixel value is greater than or equal to the first threshold, such as the pixel value ≥ 200 (corresponding to the cloud reflection or highlight area), and the pixel brightness is the top 10% of the highlight pixels in the brightness distribution. Select the pixel area that meets the second requirement in the brightness distribution as the weak light area. The second requirement includes that the pixel value is less than or equal to the second threshold, such as the pixel value ≤ 50 (corresponding to the shadow or low-illumination background area), and the pixel brightness is the bottom 10% of the low-brightness pixels in the brightness distribution.

[0043] Multiply the base threshold in the threshold matrix by a first coefficient to obtain the strong light region segmentation threshold. For example, Tstrong = Tglobal × 0.7, where Tglobal represents the base threshold and Tstrong represents the strong light region segmentation threshold. Multiply the base threshold in the threshold matrix by a second coefficient to obtain the weak light region segmentation threshold. For example, Tweak = Tglobal × 1.2, where Tweak represents the weak light region segmentation threshold. In the embodiments of the present application, since the strong light region segmentation threshold is less than the weak light region segmentation threshold, the first coefficient is less than the second coefficient. Set a lower threshold in the area with strong illumination to separate bright clouds, and in the area with weak illumination, use a higher threshold to keep the boundaries clear and avoid mis-segmenting the background area.

[0044] S103. Decompose the target cloud map into multiple levels, and use the threshold matrix, the strong light region segmentation threshold, and the weak light region segmentation threshold to perform cloud segmentation on different levels in the multiple levels to obtain the segmentation results corresponding to different levels.

[0045] In the embodiments of the present application, the image pyramid technique is used to decompose the target cloud map into multiple levels. The multiple levels include the first level, the second level, the third level, and the fourth level. The image pyramid technique includes the Gaussian pyramid and the Laplacian pyramid, etc. In one embodiment, the Gaussian pyramid is used for successive downsampling to obtain four levels L0 to L3. The first level L0 has the original resolution, such as 1024×1024, retaining all the details of the clouds and being used to capture small cloud gaps; the second level L1 is downsampled to 1 / 2 resolution, such as 512×512, and is used for medium-scale cloud segmentation; the third level L2 is downsampled to 1 / 4 resolution, such as 256×256, and is used for large-scale cloud segmentation; the fourth level L3 is downsampled to 1 / 8 resolution, such as 128×128, and is used for rapid positioning of super-large-scale clouds. The strong light region segmentation threshold is used to perform rough segmentation on the fourth level L3 to obtain the segmentation result of the fourth level. Performing rough segmentation on L3 can quickly locate the large-scale cloud region. The weak light region segmentation threshold is used to perform fine segmentation on the first level L0 to obtain the segmentation result of the first level. Performing fine segmentation on L0 can capture the cloud gap boundary. The first medium threshold in the threshold matrix is used to perform cloud segmentation on the third level L2 to obtain the segmentation result of the third level. The segmentation threshold of L2 is slightly higher than that of L3, that is, the first medium threshold is slightly higher than the strong light region segmentation threshold, so that the noise of L3 can be filtered out while retaining the medium-scale cloud area. The second medium threshold in the threshold matrix is used to perform cloud segmentation on the second level L1 to obtain the segmentation result of the first level. The segmentation threshold of L1 is slightly lower than that of L0, that is, the second medium threshold is slightly less than the weak light region segmentation threshold, so that slightly larger cloud gaps can be captured.

[0046] Applying different segmentation thresholds at different pyramid levels can optimize the segmentation for clouds and small objects of different sizes, with higher flexibility, adapt to various complex cloud forms, achieve more comprehensive cloud detection, and more accurate cloud segmentation.

[0047] S104. Fuse each segmentation result to obtain a cloud segmentation image.

[0048] After obtaining the segmentation results of each level, fuse the segmentation results of each level to form a complete cloud segmentation image. In the embodiments of the present application, the fusion methods include logical OR operation and weighted superposition, etc. By fusing each segmentation result, a more accurate overall cloud segmentation image can be formed, which can not only retain the large-range cloud contour but also capture the boundaries of small cloud gaps.

[0049] In one embodiment, before fusing each segmentation result, morphological processing can also be applied to each segmentation result to improve the accuracy. Specifically, determine whether the cloud gap features in each segmentation result meet the preset requirements. In one implementation, the cloud gap features are characterized by the size of the structural elements in the segmentation result, because the size of the structural elements is positively correlated with the cloud gap width. If the cloud gap features meet the preset requirements, for example, the size of the structural element is greater than the set value, then the closing operation is used for the segmentation result; if the cloud gap features do not meet the preset requirements, for example, the size of the structural element is less than the set value, then the opening operation is used for the segmentation result. The opening operation is to erode first and then dilate. The erosion is specifically to shrink the cloud area boundary and eliminate isolated noise points. When there is pepper noise or burrs in the segmentation result and a 3×3 square structural element is used, iterate 1 time. The dilation is specifically to expand the cloud area boundary and fill small breaks (such as cloud gaps). When there are more cloud breaks or holes in the segmentation result and a 3×3 cross or circular structural element is used, iterate 1 - 2 times. The opening operation erodes first and then dilates, which can smooth the boundary and remove small objects, removing small protrusions or isolated noise at the cloud edge, such as a 5×5 circular structural element. The closing operation is to dilate first and then erode, closing the holes inside the cloud and filling the small holes generated by threshold segmentation inside the cloud, such as a 7×7 elliptical structural element. Applying differential morphological processing to the segmentation results of different levels can optimize the boundary of the cloud area, fill small gaps, and ensure the continuity of the cloud boundary.

[0050] Furthermore, after fusing the segmentation results of each level to form a complete cloud segmentation image, morphological processing can also be applied to the cloud segmentation image to further optimize the cloud segmentation image.

[0051] Further, after obtaining the cloud segmentation image, the segmentation accuracy can be adjusted. Specifically, based on the cloud segmentation image, key metrics are obtained. The key metrics are used to reflect the quality of the cloud segmentation image. It is determined whether the key metrics reach the set values. If the key metrics do not reach the set values, the threshold matrix and / or the strong light region segmentation threshold and / or the weak light region segmentation threshold are adjusted to improve the segmentation accuracy. In one embodiment, the key metrics include local feature feedback and global state feedback. The local feature feedback includes cloud gap density, boundary complexity, etc. The global state feedback includes illumination uniformity, noise level, etc. For example, if the obtained cloud gap density does not reach the corresponding set value, the segmentation window size is reduced to improve the local threshold segmentation accuracy and enhance the ability to capture small cloud gaps. If the obtained illumination uniformity does not reach the corresponding set value, indicating that there are regions with drastic illumination changes (such as strong specular regions), the local contrast enhancement parameters are dynamically adjusted, or a higher resolution level threshold segmentation is enabled in this region. If the obtained noise level does not reach the corresponding set value, the Gaussian filter intensity is increased, or edge-preserving filtering is combined in subsequent segmentation to suppress noise. By further improving the segmentation accuracy, accurate segmentation can be maintained even under complex cloud morphologies.

[0052] Further, before outputting the final cloud segmentation image, the area distribution of each cloud gap and cloud region can also be marked on the cloud segmentation image, which is convenient for subsequent applications such as irradiance prediction or optical power prediction.

[0053] As Figure 2 shown, it is a comparison chart of the segmentation results of different cloud segmentation methods. 201 is the original cloud image, 202 is the cloud segmentation result obtained by using the ordinary threshold segmentation method, and 203 is the cloud segmentation result obtained by using the cloud segmentation method provided by the present application. It can be seen that compared with 202, 203 extracts smaller cloud regions. Therefore, the cloud segmentation method provided by the present application is more prominent in capturing the boundaries of small cloud gaps, and the cloud segmentation accuracy and precision are higher.

[0054] Based on the same inventive concept, the present application also provides a cloud segmentation device. Refer to Figure 3 shown. This device is applied to Figure 1 the cloud segmentation method shown. This device includes: A threshold matrix generation module 301, configured to generate a threshold matrix according to the global brightness histogram and local contrast features of the target cloud map; A segmentation threshold generation module 302, configured to generate a strong light region segmentation threshold and a weak light region segmentation threshold according to the illumination intensity and the threshold matrix, where the strong light region segmentation threshold is less than the weak light region segmentation threshold; A splitting module 303 is configured to decompose the target cloud map into multiple levels, and respectively perform cloud layer splitting on different levels by using the threshold matrix, the strong light area splitting threshold, and the weak light area splitting threshold, so as to obtain splitting results corresponding to different levels, wherein the image resolutions of each level are different; A fusion module 304 is configured to fuse each of the splitting results to obtain a cloud layer splitting image.

[0055] Further preferably, the threshold matrix generation module 301 is further configured to analyze the global brightness histogram of the target cloud map to extract the overall brightness distribution characteristics of the image and determine a basic threshold; divide the target cloud map into multiple local sub-blocks, calculate the contrast of each local sub-block, and assign a corresponding weight coefficient to each local sub-block according to the magnitude of the contrast; generate the threshold matrix according to the basic threshold, the contrast of each local sub-block, and the weight coefficient corresponding to each local sub-block. The splitting threshold generation module 302 is further configured to select, according to the global brightness histogram, a pixel area that satisfies a first requirement in the brightness distribution as the strong light area, and select a pixel area that satisfies a second requirement in the brightness distribution as the weak light area, wherein the first requirement includes: the pixel value is greater than or equal to a first threshold, and the second requirement includes: the pixel value is less than or equal to a second threshold; multiply the basic threshold in the threshold matrix by a first coefficient to obtain the strong light area splitting threshold, wherein the strong light area splitting threshold is less than the basic threshold; multiply the basic threshold in the threshold matrix by a second coefficient to obtain the weak light area splitting threshold, wherein the weak light area splitting threshold is greater than the basic threshold. The splitting module 303 is further configured to use the image pyramid technology to decompose the target cloud map into multiple levels, wherein the multiple levels include a first level, a second level, a third level, and a fourth level. And perform cloud layer splitting on the fourth level by using the strong light area splitting threshold to obtain a fourth level splitting result; perform cloud layer splitting on the first level by using the weak light area splitting threshold to obtain a first level splitting result; perform cloud layer splitting on the third level by using a first medium threshold in the threshold matrix to obtain a third level splitting result, wherein the first medium threshold is greater than the strong light area splitting threshold but less than the weak light area splitting threshold; perform cloud layer splitting on the second level by using a second medium threshold in the threshold matrix to obtain a second level splitting result, wherein the second medium threshold is less than the weak light area splitting threshold but greater than the strong light area splitting threshold. The fusion module 304 is further configured to merge each of the splitting results by using a logical OR operation or a weighted superposition method to obtain the cloud layer splitting image.

[0056] Further preferably, the device is further configured to apply morphological processing to each of the segmentation results, including: determining whether the cloud gap features in each of the segmentation results meet preset requirements; if the preset requirements are met, performing closing operation processing on the segmentation result; if the preset requirements are not met, performing opening operation processing on the segmentation result, where the closing operation processing and the opening operation processing are different ways of the morphological processing respectively. The device is further configured to obtain key indicators based on the cloud layer segmentation image, where the key indicators are used to reflect the quality of the cloud layer segmentation image; when the key indicators do not reach the set value, adjusting the threshold matrix and / or the strong light area segmentation threshold and / or the weak light area segmentation threshold.

[0057] Based on the same inventive concept, an electronic device is further provided in an embodiment of the present application. The electronic device can implement the functions of the foregoing cloud layer segmentation device. Refer to Figure 4 , the electronic device includes: At least one processor 401, and a memory 402 connected to at least one processor 401. In the embodiment of the present application, the specific connection medium between the processor 401 and the memory 402 is not limited. Figure 4 In Figure 4 , it is taken as an example that the processor 401 and the memory 402 are connected through a bus 400. The bus 400 is represented by a thick line in Figure 4 . The connection manners between other components are only for illustrative purposes and are not to be construed as limitations. The bus 400 can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation,

[0058] In the embodiment of the present application, the memory 402 stores instructions executable by at least one processor 401. By executing the instructions stored in the memory 402, at least one processor 401 can execute the cloud layer segmentation method described above. The processor 401 can implement Figure 3 the functions of each module in the device shown.

[0059] Among them, the processor 401 is the control center of the device. It can connect various parts of the entire control device through various interfaces and lines. By running or executing the instructions stored in the memory 402 and calling the data stored in the memory 402, various functions of the device and process data, so as to monitor the device as a whole.

[0060] In a possible design, the processor 401 may include one or more processing units. The processor 401 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 401 either. In some embodiments, the processor 401 and the memory 402 may be implemented on the same chip, and in some embodiments, they may also be separately implemented on independent chips.

[0061] The processor 401 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field-programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the seat collision avoidance method disclosed in combination with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0062] As a non-volatile computer-readable storage medium, the memory 402 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 402 may include at least one type of storage medium. For example, it may include flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (RAM), a static random access memory (SRAM), a programmable read-only memory (PROM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic memory, a magnetic disk, an optical disk, and so on. The memory 402 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.

[0063] By programming the design of the processor 401, the code corresponding to the cloud segmentation method introduced in the foregoing embodiments can be solidified into the chip, so that the chip can execute when running Figure 1Steps of the cloud segmentation method of the illustrated embodiment. How to design and program the processor 401 is a well-known technology to those skilled in the art and will not be elaborated here.

[0064] Based on the same inventive concept, an embodiment of the present application also provides a storage medium storing computer instructions, which, when run on a computer, cause the computer to execute the cloud segmentation method discussed above.

[0065] In some possible implementation manners, various aspects of the cloud segmentation method provided by the present application can also be implemented in the form of a program product, which includes program code. When the program product runs on a device, the program code is used to cause the control device to execute the steps in the cloud segmentation method according to various exemplary embodiments of the present application described above in this specification.

[0066] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can 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.

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

[0068] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0069] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus, causing a series of operational steps to be performed on the computer or other programmable apparatus to generate a computer implemented process, such that the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more processes and / or blocks Figure 1 in one or more processes and / or blocks Figure 1 in the block or blocks.

[0070] It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit and scope of the application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A method for cloud segmentation, characterized in that, The method includes: Generating a threshold matrix according to the global brightness histogram and local contrast features of the target cloud map; Generating a strong light area segmentation threshold and a weak light area segmentation threshold according to the light intensity and the threshold matrix, wherein the strong light area segmentation threshold is less than the weak light area segmentation threshold; Decomposing the target cloud map into multiple levels, and respectively using the threshold matrix, the strong light area segmentation threshold, and the weak light area segmentation threshold to perform cloud layer segmentation on different levels in the multiple levels to obtain segmentation results corresponding to the different levels, wherein the image resolution of each level is different; Fusing each of the segmentation results to obtain a cloud layer segmentation image.

2. The method according to claim 1, wherein The step of decomposing the target cloud map into multiple levels further includes: Using the image pyramid technique to decompose the target cloud map into multiple levels, wherein the multiple levels include a first level, a second level, a third level, and a fourth level.

3. The method according to claim 2, wherein The step of respectively using the threshold matrix, the strong light area segmentation threshold, and the weak light area segmentation threshold to perform cloud layer segmentation on different levels to obtain segmentation results corresponding to the different levels further includes: Performing cloud layer segmentation on the fourth level using the strong light area segmentation threshold to obtain a fourth level segmentation result; Performing cloud layer segmentation on the first level using the weak light area segmentation threshold to obtain a first level segmentation result; Performing cloud layer segmentation on the third level using a first medium threshold in the threshold matrix, wherein the first medium threshold is greater than the strong light area segmentation threshold but less than the weak light area segmentation threshold, to obtain a third level segmentation result; Performing cloud layer segmentation on the second level using a second medium threshold in the threshold matrix, wherein the second medium threshold is less than the weak light area segmentation threshold but greater than the strong light area segmentation threshold, to obtain a second level segmentation result.

4. The method according to claim 1, characterized in that, It further includes before the step of fusing each of the segmentation results: Applying morphological processing to each of the segmentation results, including: Judging whether the cloud gap features in each of the segmentation results meet a preset requirement; If the preset requirement is met, performing closing operation processing on the segmentation result; If the preset requirement is not met, performing opening operation processing on the segmentation result, wherein the closing operation processing and the opening operation processing are different ways of the morphological processing respectively.

5. The method according to claim 1, wherein The step of fusing each of the segmentation results to obtain a cloud layer segmentation image further includes: Merging each of the segmentation results by using a logical OR operation or a weighted superposition method to obtain the cloud layer segmentation image.

6. The method according to claim 1, wherein It further includes before the step of generating a threshold matrix according to the global brightness histogram and local contrast features of the target cloud map: Obtaining a ground-based cloud map; Performing grayscale processing on the ground-based cloud map to obtain a grayscale image; Performing image denoising on the grayscale image to obtain a denoised image; Applying histogram equalization to the denoised image to obtain the target cloud map.

7. The method according to claim 1, characterized in that, It further includes after the step of obtaining the cloud layer segmentation image: Based on the cloud segmentation image, key metrics are obtained, where the key metrics are used to reflect the quality of the cloud segmentation image; When the key metrics do not reach the set value, adjust the threshold matrix and / or the strong light area segmentation threshold and / or the weak light area segmentation threshold.

8. The method according to any one of claims 1-7, characterized in that, The step of generating the threshold matrix according to the global brightness histogram and local contrast features of the target cloud map further includes: Analyze the global brightness histogram of the target cloud map to extract the overall brightness distribution characteristics of the image and determine the basic threshold; Divide the target cloud map into multiple local sub-blocks, calculate the contrast of each local sub-block, and assign corresponding weight coefficients to each local sub-block according to the magnitude of the contrast; Generate the threshold matrix according to the basic threshold, the contrast of each local sub-block, and the weight coefficient corresponding to each local sub-block.

9. The method according to any one of claims 1-7, characterized in that, The step of generating the strong light area segmentation threshold and the weak light area segmentation threshold according to the light intensity and the threshold matrix further includes: According to the global brightness histogram, select the pixel area that meets the first requirement in the brightness distribution as the strong light area, and select the pixel area that meets the second requirement in the brightness distribution as the weak light area, where the first requirement includes: the pixel value is greater than or equal to the first threshold, and the second requirement includes: the pixel value is less than or equal to the second threshold; Multiply the basic threshold in the threshold matrix by the first coefficient to obtain the strong light area segmentation threshold, where the strong light area segmentation threshold is less than the basic threshold; Multiply the basic threshold in the threshold matrix by the second coefficient to obtain the weak light area segmentation threshold, where the weak light area segmentation threshold is greater than the basic threshold.

10. An apparatus for cloud segmentation, characterized in that, The device includes: A threshold matrix generation module, configured to generate a threshold matrix according to the global brightness histogram and local contrast features of the target cloud map; A segmentation threshold generation module, configured to generate a strong light area segmentation threshold and a weak light area segmentation threshold according to the light intensity and the threshold matrix, where the strong light area segmentation threshold is less than the weak light area segmentation threshold; A segmentation module, configured to decompose the target cloud map into multiple levels, and respectively use the threshold matrix, the strong light area segmentation threshold, and the weak light area segmentation threshold to perform cloud segmentation on different levels to obtain the segmentation results corresponding to different levels, where the image resolution of each level is different; A fusion module, configured to fuse each segmentation result to obtain a cloud segmentation image.

11. An electronic device, characterized in that, Includes: A memory for storing a computer program; A processor, configured to implement the cloud segmentation method according to any one of claims 1-9 when executing the computer program stored on the memory.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the cloud segmentation method according to any one of claims 1-9 is implemented.

Citation Information

Patent Citations

  • Wave cloud arranging information extraction method based on cloud block main body framework analysis

    CN104182977A

  • Thunderstorm cloud cluster identification method and system for meteorological satellite cloud picture

    CN106023177A

  • Image threshold segmentation method, terminal equipment and storage medium

    CN110517274A

  • Method and device for segmenting image by using multi-scale local threshold

    CN111815652A

  • Foundation cloud picture segmentation and classification method

    CN117809043A