# Mono Camera-Based Optical Vehicular Communication for an Advanced Driver Assistance System
## 3 Proposed Scheme
### Receiver  
#### 3.3.1 LED Detection  
In the V2X environment, different types of LEDs are deployed for various purposes, such as signaling, indicating, decoration, digital signage, and data transmission. For data transmission, OCC is a well-known technique wherein the LEDs serve as a transmitter and the camera as a receiver. On the receiver side, different techniques are applied to extract data from the corresponding LED images. Before the data processing, the location of the LEDs needs to be identified using the RoI and NN-based detection technique. In a vehicular scenario, the LEDs size and shape are not constant and may vary with distance, relative speed, road curvature, etc. In such cases, RoI detection is performed by adjusting the aspect ratio of the light intensity that contains different features. This technique is mainly performed using region-based active contour approaches that represent the segmentation of the images into defined regions. Again, RoI signaling is an OCC mode that has been proposed in IEEE 802.15.7-2018 PHY IV. Therefore, the transmitter needs to send the short-length vehicle ID and long-length communication data simultaneously. To start, the low-rate stream is extracted from the composite waveform to decode the vehicle ID; then, the other information associated with the high-rate stream is obtained from a recognized transmitter. However, one of the key performance indexes, time complexity is suboptimal in this scenario because no information can be decoded during the link setup time.  
In a mobile scenario, the IS experiences blur, and the shape of the light source changes, which cannot be solved using the RoI-based detection technique. Therefore, here, we used an NN-based technique for LED detection based on the training data. Two NNs were designed here, one to detect and track vehicular LEDs and the other to estimate the road curvature (Section 3.3.3).  
Figure 4: Proposed BPPM scheme for optical vehicular communication using a single camera.  
We used a convolutional NN (CNN), which is considered a powerful tool for image and video processing, pattern and speech recognition, and natural language processing. A CNN extracts features and learns automatically from the input images. It analyzes a small number of pixels instead of all the pixels for LED detection, thus reducing both the computational time and complexity. It has several layers, namely, the convolutional layer, pooling layer, and fully connected layer. The convolutional layer plays a key role in producing proposed regions and feature maps, whereas the pooling layer's purpose is to downsample the images while keeping all the features. Repetition of these blocks can be used to design deep NNs. The fully connected layer is generally the final layer of the architecture. The output shows that the class of the input image that is shown in Figure 5. Here, 1000 images of different road curvatures labeled with different angles were used to train the model. We used 70% of the total images for the training with the help of Darknet for our implementation using OpenCV in Python. To train the weight value, we used yolov3.weights with yolov3_training.cfg and name.txt.