## 2 Methodology
### Sun Detection
#### 2.2.2. Dome Detection
In Figure 12, three representative images of this first scenario are shown. In this case, since it is a clear-sky day, the segmentation process was able to segment the Sun in each frame. Figure 3.4 Estimation of the Sun’s position when it is occluded by a cloud. (**a**) shows the input image where the Sun is occluded by some clouds, while in (**b**), the position estimation made by the Pysolar library (blue dot), as well as the position computed by the particle filter (green dot) are shown. Figure 3.5 Solar position calculation made by Pysolar. In Figure 13, the Sun's path throughout the day is shown, where red dots represent the position given by the segmentation process, while green dots represent the position given by the particle filter. In order to compare these two trajectories, the distance between the resulting positions of both the segmentation process and the particle filter has been computed. Figure 14 shows a graph of the computed distance, in which is shown the average distance between these two trajectories (dashed black line), the value of which is about 8.03 pixels, as well as the standard deviation with a value that is around 2.05 pixels. Considering that the average radius of the Sun in the image was about 45.5 pixels, then it can be said that this error is not significant. Figure 3.6 Difference of positions between segmentation and particle filter. Figure 3.7 Representative examples with full clear-sky day conditions. (**a**) shows an image taken at 9:00, (**b**) shows an image taken at 13:00, and finally, (**c**) shows an image taken at 17:00. Figure 3.8 Path followed by the Sun. (**a**) Projection of the trajectory of the Sun. (**b**) Trajectory of the Sun. ### Scenario 2 (Partially Sunny Day)

In this scenario, a day in which a partial occlusion of the Sun is present has been selected. The set of analyzed data have been acquired by the sensor every 15 min, from 9:00 to 18:00 on 13 September. Figure 15 shows, as in the first case, three representative images of this scenario. The partial occlusions of the Sun presented in this scenario are due to a cloud that formed very close to it, which caused the segmentation process to fuse the Sun and a part of the cloud as a single object; then, the calculated position is such that it is between the Sun and the cloud. In Figure 16, the trajectory during the day, as well as the partial occlusions of the Sun are shown. As in Section 3.1, the distance between the positions given by the segmentation process and the particle filter have been computed. In Figure 17a, three instants during the day where there is a clear difference in the position of the Sun computed by the segmentation process and the particle filter are shown. These differences become more evident when the distance between these positions are plotted, as shown in Figure 17b, in which an upper limit given by two-times the standard deviation of the distance above the mean value has been marked, and as can be seen, these points are above this limit; this means that these three points moved too far away from the average distance, an effect caused by inaccurate detection in the segmentation process (see Figure 16b-d). Figure 3.9 Path followed by the Sun (Set 2). In (**b–d**), partial occlusion of the Sun are shown. Figure 2.0 Representative examples where a partially sunny day is presented. (**a**) shows an image taken at 9:00, (**b**) shows an image taken at 14:30, and (**c**) shows an image taken at 18:00. ### Scenario 3 (Cloudy Day)

Figure 18 show the representative images of the third test scenario. For this scenario, the images were taken from 10:00-14:00, every 15 min, on 17 August. Along this period of time, the Sun was completely occluded at several moments; one of these moments was at the beginning, as shown in Figure 18a. In order to compute an approximate position of the Sun, the system uses the the geographical position (latitude and longitude) of the prototype to then, project this position in the image (see Figure 19). Figure 2.1 Estimated position of the Sun.