Abstract
We focus on the issue of cloud detection in wireless sensor networks (WSN) and propose a novel detection algorithm named adaptive graph cut (AGC) to tackle this issue. We first automatically label some pixels as “cloud” or “clear sky” with high confidence. Then, those labelled pixels serve as hard constraint seeds for the following graph cut algorithm. In addition, a novel transfer learning algorithm is proposed to transfer knowledge among sensor nodes, such that cloud images captured from different sensor nodes can adapt to different weather conditions. The experimental results show that the proposed algorithm not only achieves better results than other state-of-the-art cloud detection algorithms in WSN, but also achieves comparable results compared with the interactive segmentation algorithm.
1. Introduction
Cloud is one of the most important meteorological phenomena related to the hydrological cycle and the earth radiation balance. Most of existing cloud-related research requires the technology of ground-based cloud observation, such as ground-based cloud cover evaluation. The target of cloud cover evaluation is to estimate the proportion of cloud pixels accounted for all pixels in a ground-based cloud image. At present, cloud cover evaluation is still mainly conducted by professionally trained observers who manually estimate the coverage [1]. However, different observers may obtain discrepant observation results. Moreover, this work is complicated and time-consuming. Therefore, automatic ground-based cloud cover evaluation is highly desired in this area.
Cloud detection, which classifies each pixel into cloud or clear sky element, is a fundamental task for cloud cover evaluation. In recent years, a lot of ground-based imaging devices have been developed for capturing cloud images, which provides hardware supporting for automatic cloud detection. The sky images can be obtained by these devices, such as whole sky imager (WSI) [2, 3], total sky imager (TSI) [4, 5], infrared cloud imager (ICI) [6], and all-sky imager (ASI) [7]. The traditional detection methods process the cloud images captured from only one image sensor. Meanwhile, recent advances in wireless communications and electronics have enabled connecting amount of image sensors as wireless sensor networks (WSN) where each image sensor is a sensor node [8, 9]. Cloud detection in WSN has two advantages over traditional cloud detection. First, each image sensor should allocate a computing device in traditional cloud detection, while all the image sensors in WSN share one computing device in the task manager node which is able to reduce costs. Second, cloud detection in WSN can obtain more complete cloud observation data than traditional cloud detection due to deploying sensor nodes at different locations. However, cloud detection in WSN is particularly challenging due to the severe illumination changes and vague boundaries between cloud and sky regions, as shown in Figure 1. Furthermore, in practical applications, we only have the ground-truth in one sensor node. If we train the model using the cloud images from one sensor node and test in other sensor nodes, the performance will degrade sharply, which is a transfer learning problem.

The examples of ground-based cloud images.
In this paper, we focus on the issue of cloud detection in WSN. A novel transfer learning algorithm is proposed so that the parameters of model adapt in different sensor nodes. We also propose a novel algorithm named adaptive graph cut (AGC) to detect cloud in the task manager node. First, we automatically label some pixels as “cloud” or “clear sky” with high confidence. Then, those labelled pixels serve as hard constraint seeds for the following graph cut algorithm. The experimental results show that the proposed algorithm not only achieves better results than state-of-the-art cloud detection algorithms, but also achieves comparable results compared with the interactive segmentation algorithm.
1.1. Related Work
To the best of our knowledge, our work is the first to study cloud detection in WSN, and therefore we only introduce the traditional cloud detection algorithms. The cloud observation consists of several fields, such as cloud classification [10, 11] and cloud detection [12]. Existing cloud classification techniques are generally based on the characteristics of structure [13] and texture in cloud images [14]. Recently, a lot of methods have been proposed for ground-based cloud detection. Due to the scattering difference between cloud particles and air molecules, most cloud detection algorithms treat color as the primary feature to distinguish cloud from clear sky [15]. Long et al. [5] proposed a threshold algorithm for cloud detection according to a certain radio of R over B intensity using a red-green-blue (RGB) image. Specifically, pixels with
Cloud is actually a special kind of object, and therefore it is natural to apply object segmentation techniques for cloud detection. Interactive object segmentation is a popular algorithm in this field. Among them, interactive graph cut has been widely applied and has achieved good performance [19, 20]. However, this model needs users to provide hard constraints for segmentation. Specifically, they manually label certain pixels as “object” or “background” seeds and then conduct the graph cut algorithm based on these seeds.
The remainder of this paper is organized as follows: Section 2 details the proposed algorithm; Section 3 presents the experimental results which show the super performance of our algorithm. Finally, we conclude the paper in Section 4.
2. The Proposed Algorithm
When receiving a cloud image
2.1. Transfer Knowledge in WSN
Let
2.2. Cloud Detection in the Task Manager Node
In the task manager node, we deal with cloud images transmitted from sensor nodes. Our goal is to extract the cloud pixels (foreground) from the clear sky pixels (background) precisely. The interactive graph cut is an effective algorithm for segmentation. However, one drawback is that interactive graph cut needs users to manually label hard constraints by assigning several pixels (seeds) to be part of foreground and that of background. In this paper, a novel cloud detection algorithm named adaptive graph cut (AGC) is proposed. The proposed method consists of two stages: (1) according to the characteristics of ground-based cloud images, we automatically label some pixels with high confidence as “cloud” or “clear sky” elements; (2) those labelled pixels serve as hard constraint seeds for the consecutive graph cut algorithm. The details of the proposed AGC algorithm are given below.
2.2.1. Automatically Acquiring Hard Constraints
Since the ground-based cloud image is obtained from outdoor environment, the large illumination variations are inevitable. Moreover, vague boundaries between cloud and sky regions as the intrinsic characteristics of cloud image are ubiquitous. The above characteristics make cloud detection challenging. In this paper, we propose to automatically assign several pixels with high confidence as hard constraint seeds, which forms part of the foreground and background. As stated in Section 1.1, color features are the primary characteristic for distinguishing cloud from clear sky. Based on this property, the hard constraint seeds are obtained as follows.
A red-green-blue (RGB) cloud image is transformed into a single-channel feature image. Here, we use According to (6), we can obtain hard constraint seeds with high confidence. Concretely, pixels with
The strategy of automatically labeling hard constraint seeds is feasible in practice. Since the threshold of

The examples of automatically labeling hard constraint seeds in the cloud images. The pixels with green are the seeds of cloud elements and the pixels with red are the seeds of clear sky elements.
2.2.2. Graph Cut Algorithm
After obtaining the hard constraint seeds, we conduct the graph cut algorithm. Let
The cost function that we use as the soft constraints for segmentation should include region and boundary properties. Let P denote all the pixels in the image and N denote the set of pairs
In this paper, Assume that we get n foreground seeds and m background seeds denoted by For each pixel p, calculate its color feature distance to each seed, denoted as The boundary cost
To obtain the values of all the parameters, we consider how to solve this segmentation problem. The min-cut/max-flow algorithm in [21] is applied for solving (8), and [19] proved that this min-cut algorithm would give a segmentation minimizing among all segmentations.
3. Experimental Results
3.1. Database
One sensor node used to capture the ground-based cloud images is a digital camera equipped with a fisheye lens, which provides a field of view larger than
3.2. Methods in Comparison Study
In this paper, the proposed method is compared with three current cloud detection methods: (1) ratio threshold (Rad) [16]: we assign
3.3. Experimental Results and Analysis
To evaluate the effectiveness of the proposed algorithm for the cloud detection, we carry out a series of experiments on the database mentioned in Section 3.1. Furthermore, meteorological experts manually segment the 500 cloud images into binary masks which are assigned as the ground-truth. Quantitative evaluations of all the above algorithms are performed as
Table 1 shows the average detection accuracy of different algorithms in WSN, from which we can see that our algorithm obtains significant improvement on the performance. It is because our algorithm considers the difference of cloud image distributions from different sensor nodes and transfers knowledge in WSN. Based on the transfer learning algorithm stated in Section 2.1, our method assigns specific thresholds
Average detection accuracy of different algorithms in WSN.
Table 2 lists the detection performance by the four detection algorithms in one sensor node. We can see that our method achieves the highest detection accuracy. Figure 3 shows the results of some examples detected by the four algorithms. From the results, several conclusions can be drawn. First, the “Rad” and “Diff” algorithms are not adaptable for different sky conditions. Second, “Adp” algorithm cannot solve the conditions with nonuniform illumination. Third, the proposed algorithm obtains the best detection results in all weather conditions. In addition, we also compare the proposed algorithm with interactive graph cut which needs users to label hard constraint seeds manually. Figure 4 shows the detection results. We can see that the proposed algorithm achieves comparable detection results compared with the interactive graph cut, while our algorithm overcomes the shortcomings arising from manual labeling hard constraint seeds.
Average detection accuracy of different algorithms in one sensor node.

The experimental results of four different detection algorithms in one sensor node.

(a) Original cloud image; (b) labeling hard constraint seeds automatically; (c) labeling hard constraint seeds manually; (d) the proposed AGC detection results; (e) interactive graph cut detection results.
4. Conclusions
In this paper, we propose a novel transfer learning algorithm and a detection algorithm named adaptive graph cut (AGC) for segment ground-based cloud images in WSN. The transfer learning algorithm could compensate the difference of cloud image distributions captured from different sensor nodes. The AGC could automatically label pixels with high confidence as “cloud” or “clear sky,” and those labelled pixels serve as hard constraint seeds for the following graph cut algorithm. The experimental results show that the proposed algorithm not only achieves better results than state-of-the-art cloud detection algorithms in WSN, but also achieves comparable results compared with the interactive segmentation algorithm.
Footnotes
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgments
This work is supported by National Natural Science Foundation of China under Grant nos. 61401309 and 61271429 and Doctoral Fund of Tianjin Normal University under Grant no. 5RL134.
