# Flickering-Free Distance-Independent Modulation Scheme for OCC
## 3 Theoretical Description of the Proposed Modulation
### Theoretical Fundamentals
Therefore, if the light is turned on at \(T_{i}\) of the capturing process of frame \(m\), the light will be also turned on at \(T_{i}\) of frame \(m+1\) acquisition. Furthermore, consecutive frames of the light source's ROI will be almost equal. In other words, when \(f_{\text{SW}}=\alpha,f_{\text{CAM}}\) the consecutive frames are highly correlated and therefore \(PCC\approx 1\). In the second case, the signal's period will repeat exactly \((\alpha+0.5)\) times during the frame's acquisition. In other words, when the camera start the next frame's capture, the signal will be shifted 50% of its period. If the light is turned on at \(T_{i}\) of the capturing process of frame \(m\), the light will be turned off at \(T_{i}\) of frame \(m+1\) acquisition due to the 50% duty cycle of this signal. Furthermore, consecutive frames of the light source will be close to inverted images. Therefore, when \(f_{\text{SW}}=(\alpha+0.5)f_{\text{CAM}}\) the consecutive frames are almost anti-correlated and therefore \(PCC\approx-1\). In the third case, the signal's period will repeat exactly \((\alpha+k)\) times during the frame's acquisition. In other words, when the camera start the next frame's capture, the signal will be shifted between 0% and 50% of its period, depending on the selected switching frequency. The resulting images of consecutive frames varies from highly correlated to almost anti-correlated in a quasi linear relation, and therefore \(-1<PCC<1\). The inspection of these consecutive frames gives information related to the frequency of the switching signal. However, the PCC is not the only statistical measure that provides information about the signal transmitted over the light. The 2D mean \((\mu_{ROI}(x,y))\) and the 2D standard deviation \((\sigma_{ROI}(x,y))\) also present interesting relations with the light source input signal. The 2D mean is related to the average pixel's intensity, therefore this value will be affected by the environmental conditions, the cameras exposition setup, and the light intensity. Two frames of switching lamps, captured by the same camera under similar environmental conditions will have alike intensity values, even if the frequency varies. Nevertheless, in the case of a continuous input signal, the 2D mean value will increase due to the elimination of the dark strips. In the same way, since the 2D standard deviation \((\sigma_{ROI}(x,y))\) represents the variability of the pixels intensity, its value do not change for the blinking images in which pixels diversity is similar (dark and light strips). However, the 2D standard deviation of the image where the light is continuously turned on is close to zero. These two statistic measurements provide important information related to the light source's input signal, specially by comparison. If a continuous signal is employed, \(\sigma_{ROI}(x,y)\) will be close to zero while \(\mu_{ROI}(x,y)\) will directly represent the lamp optical power. If a switching signal is used, \(\sigma_{ROI}(x,y)\) will increase while \(\mu_{ROI}(x,y)\) will decrease. Therefore, by comparing the 2D mean and standard deviation of two frames, a possible input signal change can be detected. Consequently, these elements can be used for implementing a simple wake-up process. In summary, the proposed process employs two different input signals for the emitter: a continuous one when the system is waiting for bits to transmit; and a square signal during the emitting stage. The selection of the square signal switching frequency depends on the symbol to be represented and the system's characteristics. Additionally, each symbol is transmitted for m frames. In the receiver side, the transmission start is detected based on the 2D standard deviation of the frame \((\sigma_{ROI}(x,y))\), as seen in Figure 7. Then the corresponding symbols are obtained from the calculated average PCC. Each process will be described in detail in the upcoming sub-sections. Figure 7: General flow chart of the proposed modulation scheme.