# Real-Time Flood Monitoring with Computer Vision through Edge Computing-Based Internet of Things
## 5 Results and Analysis
### Night Readings  
For the night readings, 172 data points were collected in total. The readings under the complete absence of visible light and external sources resulted in a root-mean-square error (RMSE) of \(0.2\) m, significantly lower than that of daylight measurements. The absence of reflections and wayward lights and the activation of infrared light during the night provided a much more stable and accurate reading. The breakdown of the weather conditions for the collected results throughout the testing phase is presented in Table 1.  
Figure 11: Water level with reference to MSL; scenario 3 displays normal fluctuations in weather conditions. Figure 12: Water level with reference to MSL; scenario 4 displays readings under abrupt weather changes. The weather conditions varied constantly as the testing period progressed. During the dark hours, cloudy and fair weather conditions were indistinguishable, whereas fair during the daytime referred to clear skies with more sunlight exposure. To distinguish the different weather conditions, Weather Underground [47] was used to obtain historical data for each hour of the testing period. Since not all areas of a city experience the exact same weather, an error from mismatching the weather condition to its testing hour is possible. The results were segmented into different scenarios to better differentiate the conditions the system experienced in each period. Each testing period, the system experienced different weather conditions during different times of the day and night, and on multiple occasions throughout, the weather abruptly changed on-site. We observed that the readings were smoother during the night, with tiny fluctuations around the ground-truth ultrasonic sensor data. As the day started, the deviations and fluctuations grew larger. Across the three weather conditions, as can be seen from the graphs and the tables, a fair weather provided the most erroneous readings, both during the day and night. The RMSE, however, was only marginally greater than in rainy weather during the night, while it was significantly greater during the day. Cloudy conditions also covered the occurrence of partial clouds over the water region, hence the possibility of partial illumination and partial shading of the water region, which contributed to the high RMSE during the day. The biggest factor contributing to the high RMSE during the day was occlusion and glare, resulting from the reflections of the sunlight hitting the camera sensor off the water surface. Night readings showed a promising output which closely reflected the movement of the water level captured by the benchmarked ultrasonic sensor. On the contrary, clear skies during the day resulted in the largest RMSE, thus being responsible for a big percentage of the day's large RMSE values. As the conditions became rainy and stormy, the readings became more accurate and resulted in the lowest RMSE during the day while being slightly more erroneous than the night readings. Nonetheless, when the rain poured down, the system captured depth accurately and consistently. The spatial filter continuously smoothened out the higher-frequency raindrops disturbing the water surface. The case for complex illumination conditions can be made for daytime readings rather than night readings, as the presence of reflections and glare under cloudy and fair weather conditions proved to be challenging for the camera to tackle. It is also important to note that the measurement spots of the ultrasonic sensor and camera sensors were located some distance apart. This situation was also one of the potential sources of error due to the dynamic movement of the water flow throughout the stream, which might have led to differences in water level readings. Moreover, due to the limitation of the on-site camera placement, shadows formed on the water surface due to the reflection of the sky, rendering the readings erroneous.