# Prototype to Increase Crosswalk Safety by Integrating Computer Vision with ITS-G5 Technologies
## 3 Prototype Specification
### ITS-G5 Prototype Architecture  
Figure 3 shows the RSU station operating process. The motion sensor component is pointed towards the crosswalk and covers its entire area. Any object on the crosswalk causes the motion sensor to activate the pedestrian detection (PD) module. The video acquired by the camera is analyzed by the YOLO v3 CNN algorithm, which scans image by image in search of pedestrian patterns.  
Whenever the object detection software identifies a pedestrian on the crosswalk, it triggers the RSU-ITS-G5 module, depicted in Figure 4, which broadcasts the predefined DENM messages, and, in this way, car drivers are notified about pedestrians on the crosswalk.  
Figure 3: Road network infrastructure (RSU) Pedestrian Detection module.  
The motion sensor avoids unnecessary processing whenever the crosswalk is empty, in this way reducing the average energy consumption.  
The RSU-ITS-G5 module, shown in Figure 4, implements the ITS-G5 protocol stack to manage the creation of DENM messages with information about pedestrians on the crosswalk, implemented in the ITS Facilities layer. All the mandatory headers of the BTP and GeoNetworking protocols are also filled with the specific scenario parameters. The Pedestrian detection (PD) module manages a trigger that activates DENM messages broadcast while pedestrians are on the crosswalk.  
The OBU station is inside the car connected to the infotainment system and has ITS-G5 support to receive DENM messages as shown in Figure 5. The OBU station uses 802.11p hardware and has support to the ITS-G5 protocol stack. DENM messages are received by the physical layer and are delivered to the upper layers to be decoded. At the facilities layer, the DENM message data are analyzed and made available to the application layer. This application layer interprets the information and shows the presence of pedestrians on crosswalk on the car's infotainment system.  
Figure 6 exhibits the typical prototype operating scenario. The RSU's motion sensor device detects movement on the crosswalk; the video camera is started; the images recorded are analyzed; if pedestrians are detected on the crosswalk, the RSU's ITS-G5 module creates the DENM message to broadcast using the 802.11p wireless protocol. The messages are received on the vehicle's OBU device and, after being decoded, the information is shown on the car's infotainment system. This way, the driver is notified about pedestrians on the crosswalk and can take the necessary security measures.  
Figure 4: RSU ITS-G5 decentralized environmental notification messages (DENM) creation.  
Figure 5: Vehicle onboard unit (OBU) in-vehicle DENM messages reception and presentation.  
Figure 6: Typical RSU operating scenario.  
The prototype uses a VMWare virtual machine with Ubuntu 16.04, with a kernel modification to support Atheros Ath9k wireless drivers which support the IEEE 802.11p standard. DENM messages are sent by a cooperative ITS-G5 structure which works through a vehicular ad hoc network (VANET) to carry out an I2V communication.  
CSS Labs' OpenC2X [35] software was used to implement the ITS-G5 protocol stack and to create the DENM messages. The OpenC2X is an experimental and open-source platform for creating ETSI ITS-G5 services.