## 2 Materials and Methods
### Image Processing Module
#### 2.2.1 Image Segmentation
A simple classifier is used in [14] after the simplification filter, which requires as input only the number of clusters, namely the k-means classifier. In Figure 2 is shown a comparison of the results obtained by applying the segmentation methods proposed in [13] and [14] on the image in [19]. This is one of the most complicated images which can be delivered by a fisheye camera in practice. We can remark, comparing visually the images in the panels from Figure 2b-d, that the simplification filters proposed in [14] preserve better the details of the border region between sky and non-sky regions than the simplification filter proposed in [12,13], affecting the edges less. Using the simplification filters proposed in [14], we observe, comparing panels from Figure 2f-h, an improvement in the separation of building/sky versus the result obtained by applying the simplification filter in [12,13]. Figure 2: _Cont._  
In these panels, the regions classified as non-sky are marked in black. LASSO slightly outperforms OLS. In the case of the segmentation method proposed in [12; 13], whose result is shown in panel (h), we observe areas in the building where the classifier decides that the building is part of the sky cluster (these areas are not marked in black). The running time of the segmentation method proposed in [14] is longer than the running time of the segmentation method proposed in [12; 13]. The segmentation algorithm selected for the present paper uses the blue channel of the acquired image and the segmentation is performed by using the geodesic reconstruction  
Figure 2: A comparison of the results obtained by applying the simplification filters and the corresponding segmentation methods proposed in [13] and [14] on the image Flatiron fisheye: (**a**) original; (**b**) after simplification filter based on OLS [14]; (**c**) after simplification filter based on LASSO [14]; (**d**) after simplification filter in [13]. Segmentation results into sky/non-sky, obtained on the blue channel: (**e**) without simplification filter, (**f**) with simplification filter based on OLS, (**g**) with simplification filter based on LASSO, (**h**) with simplification filter proposed in [13]. A simple k-means classifier was used. © 2021 IEEE. Reprinted, with permission, from [PERSON]. [PERSON], [PERSON] and [PERSON], “Preliminary results on sky segmentation”, 2015 International Symposium on Signals, Circuits and Systems (ISSCS), 2015, pp. 1–4, doi: 10.1109/ISSCS.2015.7203933. using the dilatation simplification filter [12; 13] associated with the k-medoid classification algorithm [20]. The related literature [12; 13; 14] showed that using the k-means algorithm in order to segment the sky regions gives very good results. Our choice for the k-medoid algorithm is based on the fact that, generally, the k-medoid yields better results than the k-means algorithm when dealing with a segmentation task. The result of the segmentation step is a binary sky map. The segmentation approach was extensively tested on hundreds of fisheye camera images and the estimated accuracy is around 97.87%. Various weather conditions were considered: sunny, cloudy and light rain. However, considering only heavy rain weather conditions, the accuracy drops to 81.28%, due to rain drops that corrupt the image seen by the camera.