# The Necessity of LED to Ambient Light Ratio Optimization for Vehicular Optical Camera Communication
## 3 LED to Ambient Light Ratio Optimization
### A Top-Down Explanation on How L2A Ratio and LED Density Determine Bit Detection Accuracy
#### 3.3.3 Effect of L2A Ratio and LED Spacing on Extinction Ratio and Interference  
(a) Effect of L2A Ratio on Extinction Ratio  
As mentioned earlier, LED extinction ratio is the difference in terms of the ratio between the greyscale of On and Off LEDs in the captured image. Intuitively, the greyscale of On and Off LEDs are different only because the intensity of the light coming from On and Off LEDs to the camera are different. In the VOCC system, the difference in the intensity of the light coming from On and Off LEDs can be expressed through the LED to ambient light (L2A) ratio defined as:  
\[r_{L2A}=\frac{L_{v}}{E_{v}R}, \tag{9}\]  
where \(L_{v}\) is the luminance of an LED, \(E_{v}\) is the ambient light illuminance, and \(R\) is the reflectance of the LED surface. The direct effect of the L2A ratio on the LED extinction ratio is mathematically described as:  
\[r_{e}=\left(1+r_{L2A}\right)^{1/\gamma}, \tag{10}\]  
where \(r_{e}\) is the LED extinction ratio, \(r_{L2A}\) is the L2A ratio, and \(\gamma\) is the gamma value used for gamma encoding. In digital image acquisition, the greyscale value \(G\) at a pixel in the image sensor at a given ISO speed \(S\) set by the camera is determined as [11]:  
\[G=118\times\left(\frac{H}{H_{SOS}}\right)^{1/\gamma}, \tag{11}\]  
Figure 6: Effect of extinction ratio and interference on between-class variance (Bvar) and within-class variance (Wvar). where \(H\) denotes the luminous exposure, \(H_{\text{SOS}}=10/S\) denotes the indicated luminous exposure at the ISO speed \(S\) to obtain the greyscale value of 118, and \(\gamma\) denotes the gamma value used for gamma encoding. The light from an Off LED is the reflected ambient light from the LED surface. Thus, the luminous exposure of an Off LED pixel is calculated as [11]:  
\[H_{Off}=\frac{10E_{\text{\tiny{p}}}Rt}{K\pi N^{2}}, \tag{12}\]  
where \(E_{\text{\tiny{p}}}\) denotes the ambient light illuminance, \(R\) denotes the LED surface reflectance, \(t\) denotes the camera exposure time, \(N\) denotes the lens f-number, and \(K\) denotes the reflected-light meter calibration constant given by camera manufactures. The light from an On LED is composed of the light emitted by the LED itself and the reflected ambient light from the LED surface. Thus, the luminous exposure of an On LED pixel is determined as [11]:  
\[H_{On}=\frac{10E_{\text{\tiny{p}}}Rt}{K\pi N^{2}}+\frac{10L_{\text{\tiny{p}}}t }{KN^{2}}, \tag{13}\]  
where \(L_{\text{\tiny{p}}}\) is the luminance of the LED. Equation (10) can be derived from Equations (8), (9) and (11)-(13). (b) Effect of L2A Ratio and LED Spacing on Interference  
Interference is caused by image blurriness, which is the result of imperfections in the image acquisition process. These imperfections, including air diffraction and optical aberrations, cause the light to be spread out over a region rather than focused to a point, hence creating image blurriness. As illustrated in Figure 7, these effects can be mathematically described as convolving the incoming image with a Gaussian blur function:  
\[I^{\prime}(r,c)=\sum_{i}\sum_{j}I(i,j)\times G(r-i,c-j), \tag{14}\]  
where \(I^{\prime}\) is the result image, \(I\) is the incoming image, and \((r,c)\) are the row and column coordinates in the image. \(G\) is the Gaussian blur function given as:  
\[G(r,c)=\frac{1}{2\pi\sigma^{2}}e^{-\frac{r^{2}+\sigma^{2}}{2\sigma^{2}}}, \tag{15}\]  
where \(\sigma\) is the standard deviation of the Gaussian distribution. As illustrated in Figures 5 and 7, interference increases the pixel values of Off LEDs around On LEDs. From Equations (14) and (15), the interference is directly proportional to the greyscale \(I\) of On LEDs and the value of the Gaussian function, which is in turn directly proportional to the standard deviation \(\sigma\) and the LED spacing \(r^{2}+c^{2}\) between the LEDs in the image. The greyscale \(I\) of On LEDs is in turn directly  
Figure 7: Image interference. proportional to the L2A ratio. Consequently, the interference is determined by the L2A ratio and the LED spacing.