# IoT-Based System for Improving Vehicular Safety by Continuous Traffic Violation Monitoring
## 6 Conclusions  
This paper has proposed an IoT-based traffic violation monitoring system for the ubiquitous monitoring of the vehicle speed, number of passengers, and seatbelt fastening. The system aims at improving safety in vehicles and reducing the harm caused by traffic accidents. Such a system can benefit the field of autonomous vehicles. The system consists of three computing layers: the edge computing layer, the fog computing layer, and the cloud computing layer. The edge layer is connected to the sensors, and it is responsible for collecting data from the sensors and filtering and aggregating these data before sending them to the fog layer. The fog layer runs the speed estimation, passenger count, and seatbelt check algorithms and sends the results to the cloud layer. The cloud layer receives data from all vehicles and performs a second check for traffic violations before sending reports to the traffic stations. The paper concludes that adding the fog layer between the edge and cloud layers improves the accuracy of estimation, because this layer shares the computational load with the edge and sends the results to the cloud. Moreover, the paper concludes that the sensor-based monitoring approach can achieve high accuracy without requiring the same amount of computational resources as the image-recognition-based approach. Our future work will include, firstly, improving the accuracy of the system by overcoming the limitations and investigating the effect of the system on other parameters, such as latency, throughput, and communication overhead. Secondly, future work will focus on improving the security and privacy of the system using blockchain and smart contracts. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**Correct Detection**} & \multicolumn{2}{c}{**Incorrect Detection**} & \multicolumn{2}{c}{**Accuracy**} \\ \hline
**Door** & **without** & **with Fog** & **without** & **with Fog** & **without** & **with Fog** \\  & **Fog Layer** & **Layer** & **Fog Layer** & **Layer** & **Fog Layer** & **Layer** \\ \hline Front left & 47 & 49 & 3 & 1 & 94\% & 98\% \\ Front right & 48 & 50 & 2 & 0 & 96\% & 100\% \\ Rear left & 47 & 49 & 3 & 1 & 94\% & 98\% \\ Rear right & 48 & 50 & 2 & 0 & 96\% & 100\% \\ Average & & & & & 95\% & 99\% \\ \hline \hline \end{tabular}
\end{table} 
Table 6: The accuracy of seatbelt detection with and without the fog layer. The authors in [21] show that security and privacy concerns limit the implementation of efficient vehicular traffic applications. Therefore, we will apply our proposed work in [54; 55; 56] using blockchain to address these challenges. This system can be integrated with traffic flow monitoring [57] and road quality detection [31] for the collection of data on road conditions. In addition to the sensor-based and vision-based approaches, social networking traffic data collection achieves accurate results in detecting accidents and traffic conditions [58]. This approach needs the support of big data analytics [59]. As blockchain is a distributed system, it can support the integration between data from sensors and data from social networks, enabling better traffic monitoring. Another future direction is to examine the proposed system's performance in heterogeneous vehicular communication environments [60]. Conceptualization, Y.-A.D.; methodology, Y.-A.D., M.A.H., E.-Y.D. and W.A.-u. ; software, Y.-A.D.; validation, Y.-A.D., M.A.H., E.-Y.D. and W.A.-u. ; formal analysis, Y.-A.D. and M.A.H. ; investigation, Y.-A.D. and M.A.H. ; resources, Y.-A.D. and E.-Y.D. ; data curation, Y.-A.D. and E.-Y.D. ; writing--original draft preparation, Y.-A.D., M.A.H. and E.-Y.D. ; writing--review and editing, Y.-A.D., M.A.H., E.-Y.D. and W.A.-u. ; visualization, Y.-A.D. and E.-Y.D. ; supervision, Y.-A.D. and M.A.H. ; project administration, Y.-A.D. and E.-Y.D. ; funding acquisition, Y.-A.D., M.A.H., E.-Y.D. and W.A.-u. All authors have read and agreed to the published version of the manuscript. This research received no external funding. Not applicable.