Previous Article in Journal
Wide-Spectrum Tuning and Narrowing of 780 nm Broad-Area Diode Laser with Littrow-Type Transmission Gratings
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

ZEROES: Robust Derivative-Based Demodulation Method for Optical Camera Communication

by
Maugan De Murcia
1,*,
Hervé Boeglen
1 and
Anne Julien-Vergonjanne
2
1
University of Poitiers, CNRS UMR 7252, XLIM, 86000 Poitiers, France
2
University of Limoges, CNRS UMR 7252, XLIM, 87000 Limoges, France
*
Author to whom correspondence should be addressed.
Photonics 2024, 11(10), 949; https://doi.org/10.3390/photonics11100949 (registering DOI)
Submission received: 30 August 2024 / Revised: 28 September 2024 / Accepted: 8 October 2024 / Published: 9 October 2024
(This article belongs to the Special Issue Optical Wireless Communications (OWC) for Internet-of-Things (IoT))

Abstract

:
Most of Optical Camera Communication (OCC) systems benefit from the rolling shutter mechanism of Complementary Metal-Oxide Semiconductor (CMOS) cameras to record the brightness evolution of the Light-Emitting Diode (LED) through dark and bright strips within images. While this technique enhances the maximum achievable data rate, the main difficulty lies in the demodulation of the signal extracted from images, subject to blooming effect. Thus, two main approaches were proposed to deal with this issue, using adaptive thresholds whose value evolves according to amplitude changes or detecting signal variations with the first-order derivative. As the second method is more robust, a new demodulation method based on the detection of the zeros of the first-order derivative of the extracted signal was proposed in this paper. Obtained results clearly show an improvement in the extracted signal demodulation compared to other methods, achieving a raw Bit Error Rate (BER) of 10−3 around 50 cm in a Line-Of-Sight scenario, and increasing the maximum communication distance by 43.5%, reaching 330 cm in the case of a Non-Line-Of-Sight transmission.

1. Introduction

The development of Light Emitting Diode (LED) technology has brought a revolution in the lighting field, with greater energy efficiency than incandescent and halogen light bulbs [1]. Moreover, it also represents a tremendous opportunity for alternative and complementary wireless communication to Radio Frequency (RF) systems, which are now subject to spectral crowding [2] due to the massive use of new technologies such as Internet of Things (IoT) or cloud computing. Visible Light Communication (VLC) [3], a subset of Optical Wireless Communication (OWC) [4], takes advantages of the fast switching state of LED to transmit data at a frequency higher than the critical flicker fusion frequency of human eye in order to provide both communication and illumination at the same time. While a VLC transmission is generally based on a LED at the emission and a photodiode (PD) at the reception, Optical Camera Communication (OCC) [5] is exclusively restricted to the use of a camera as a receiver, directly benefiting from the omnipresence of smartphones for a rapid, large-scale and low-cost deployment of OWC systems in daily life as it does not require any hardware modifications, only software implementation.
Even though OCC promises great accessibility, the achievable data rate remains the major limitation of this technology, considering the low frame rate of most cameras (about 30 or 60 fps) in accordance with the Nyquist frequency. However, a clever approach was proposed to overcome this limitation by taking advantage of the architecture of Complementary Metal-Oxide Semiconductor (CMOS) cameras [6], making smartphones cheap and equipping them with ease of integration compared to Charge-Coupled Device (CCD) cameras. While the picture-taking of CCD cameras is based on the global shutter, meaning that all the pixels composing the image sensor are exposed simultaneously to the light, CMOS cameras are based on the rolling shutter, where pixels are illuminated column-wise [7]. Although rolling shutter is considered as a major drawback in photography since causing the deformation of fast-moving objects due to the column shift mechanism, the latter becomes an opportunity for OCC systems to enhance the data rate, considering the column shift frequency as sampling rate instead of frame rate. In doing so, the achievable data rate increases from a few bits per second to several thousand bits per second [8], which becomes enough to perform a lot of communication applications. Indeed, by setting the transmission frequency of the light source up to twice as low the column-shift frequency, bright and dark strips will appear on the resulting image, respectively, corresponding to ON and OFF states of the LED during image capture. This sequence of bright and dark strips is extracted from the image using specifically designed Region-Of-Interest (ROI) techniques [9,10], and the original information is thereafter recovered by demodulating the signal. However, the main difficulty of this operation comes from the blooming effect, characterized by the amplitude variation of the extracted signal due to a difference in light exposure intensity of all pixels, the most aligned to the source being the brightest. Since a demodulation based on constant-value thresholding is therefore no longer adapted, adaptive threshold methods [11] have been developed in order to correctly demodulate the extracted signals, but their performance still remains limited on large and rapid amplitude variations signals. Moreover, other approaches based on the first-order derivative of the extracted signal have been proposed in order to directly identify the state changes by determining both local maximum and minimum values, named peaks and valleys, respectively [12,13], or even the second-order derivative [14]. Even though developed methods based on derivatives have improved the demodulation efficiency, noisy perturbations and low amplitude variations between states remain the main limitations of these techniques since derivative greatly depends on the amplitude variations of the signal. Therefore, the main contribution of this article is to propose a new demodulation method, the Zeros Evaluation for Robust and Optimal Edges Selection (ZEROES) method, based on the detection of zeros of the derivative for determining the precise signal edge position using linear functions, achieving better communication performance due to its greater level of robustness in comparison with the demodulation methods previously presented. With experiments conducted in both Line-Of-Sight (LOS) and Non-Line-Of-Sight (NLOS) scenarios, the comparison of demodulation efficiency through the measurement of the Bit Error Rate (BER) and the percentage of bits received clearly show a significant improvement of the communication performance when using the ZEROES method.
The rest of this paper is organized as follows: Section 2 presents the different processing steps of OCC images. Section 3 describes the ZEROES developed method. Section 4 details the experimental setup employed to perform experiments. Section 5 is dedicated to the obtained results with their discussions. Finally, a conclusion summarizes this work, and a discussion about our future work is presented.

2. Optical Camera Communication

While VLC receivers based on photodiodes convert the incident light into a photocurrent, a camera returns a color image of the light source and its surrounding environment. This fundamental difference in the output signal of an image sensor therefore requires more complex operations at the receiver to process the signal. Despite the increased difficulty, a camera offers several advantages over a photodiode, such as a larger field of view, a spatial separation of light providing a clear distinction between different light sources, or a wavelength separation of the incident light into RGB component through the Bayer filter. With all the benefits brought by OCC, a wide range of applications have been identified in a wide variety of areas, such as indoor localization [15], Vehicle-to-Vehicle (V2V) communication [16], or IoT applications [17]. All the different steps required in the processing of the OCC images based on rolling shutter, from the image capture to the original information recovering, are illustrated in Figure 1.

2.1. Rolling Shutter

In order to achieve a data rate suitable for real-life applications, OCC is taking advantage of the rolling shutter mechanism of CMOS cameras to increase the number of received bits per image through bright and dark strips. However, to ensure a good contrast between the strips, and thus a good signal reception, not only must the light source frequency be set down to half the shutter speed in accordance with Nyquist criterion, but the camera must also be correctly configured. Indeed, both exposure, representing the light exposition time of each pixel, and the International Standard Organization (ISO) value, corresponding to the image sensor sensitivity, need a proper parametrization depending on the environment. With these conditions met, pixel columns will generate a bright strip when illuminated by the light source or a dark strip when the LED is off. Hence, the higher the light source frequency, the narrower the bright and dark strips will be, resulting in a higher data rate as long as the strips remain discernible from one another [18]. The values of these parameters are experimentally determined in Section 4.

2.2. Image Conversion

With the information transmitted through the brightness variation of a white LED, images contain a redundancy of the information through the three color channels. Usually, RGB images are firstly converted in another representation to reduce the image dimensionality, such as grayscale [6] or value [19] (from hue saturation value representation), therefore reducing the whole processing time. Hence, in the grayscale representation, each pixel is a linear combination of the three RGB pixel values, whereas only the maximum pixel value is retained in the value representation. Thus, the value representation provides a better contrast between bright and dark strips on colorful object while adding a reasonable amount of noise, whereas the grayscale representation is more resilient against chromatic aberration [20]. In fact, this phenomenon occurs when the lens fails to focus the color light in a same pixel due to a refractive index changing with wavelength, which is even more pronounced when the contrast between the strips is high. Hence, as illustrated in Figure 2a, chromatic aberration makes the dark strips boundaries colorful, which are therefore considered as bright strips in value representation (Figure 2c), while the impact of the color boundaries on the strips detection is less important in grayscale (Figure 2b). Moreover, as images are captured with rolling shutter, a pixel column therefore contains a redundancy of the transmitted information. Thus, processing all the pixels of a column is not required to correctly recover the transmitted information. The same remains true to a lesser extend for the pixel rows when the transmitted signal is oversampled, resulting in wider bright and dark strips in the image.
Therefore, the image can be downsampled in height (keeping 1 pixel row over Δ r o w , with Δ r o w being the decimation factor along the pixel rows) and width (keeping 1 pixel column over Δ c o l , with Δ c o l being the decimation factor along the pixel columns) in order to reduce the processing time aiming for a real-time execution [21].

2.3. Region of Interest

Once the image converted and downsampled, the transmitted signal encoded through the dark and bright strips’ pattern must be extracted from images. The operation represents a crucial step of the processing since a poor signal detection will inevitably lead to a poor signal demodulation, resulting in transmission errors. While this operation remains quite simple on images only composed of dark and bright strips with a high contrast, this becomes much more complex when the distance between the light source and the camera increases or when the surrounding environment interferes with the communication. Thus, different solutions have been proposed to address this issue, being derived from computer vision techniques to detect the light source position in the image using a Gaussian blur filter and a binary threshold [9], or using statistical methods, such as Principal Component Analysis (PCA). PCA is a dimension reduction method that defines a sequence of unit vectors, named principal components, where each vector represents the line that best fits the data by minimizing the average squared perpendicular distance from the points to the line while being orthogonal to the previous vector. By applying PCA directly to images, considered as data arrays, the transmitted signal can be extracted thanks to the high correlation between pixel rows, since the signal is recorded in the bright and dark strips’ pattern, vertically aligned along the image [19]. The latter is the ROI method selected to perform the conducted experiments due to its performance and robustness.

2.4. Demodulation

The main difficulty of the demodulation lies in the blooming effect affecting the extracted signal amplitude. As the demodulation intends to differentiate between the signal logic states to recover the binary signal, a sudden and significant change in the extinction ratio (ER) between the bright and dark strips therefore compromises the transmitted data integrity, considering a constant-value threshold demodulation. Hence, two different approaches were considered to overcome the blooming effect issue. The first consists of using adaptive thresholds whose values follow the signal amplitude variations, third-order polynomial curve fitting (3rd-OPF) [11]. The second, more robust against the blooming effect, is based on the first-order derivative calculation to identify the rising and falling edges of the extracted signal. Indeed, different methods have been proposed, such as the Boundary Pixel-Based Piecewise Linear Function (BPBPLFT) scheme [12], which uses combined linear functions as thresholds based on the position of signal edges, the HyperSight (HS) method that directly performs the demodulation from the normalized first-order derivative without properly using a threshold [13] or by directly identifying the strips transitions based on the derivative slopes [14]. Hence, this paper introduces a new demodulation method based on a first-order derivative approach, described in Section 3, whose performance is compared to other proposed methods in the literature.

2.5. Binarization

Finally, the demodulated signal is converted into a binary signal using the P b factor, representing the number of pixels contained per bit, given by [19]
P b = Σ w i d t h × f p s Δ c o l × b p s
where f p s is the camera frame rate expressed in frames per second, b p s is the signal bit rate in bits per second, Δ c o l is the column decimation factor, and Σ w i d t h is the total pixel width of a frame, taking into account the Inter-Frame Gap (IFG) [22], representing the gap time between consecutive frames when the camera cannot receive the incident light, as illustrated in Figure 3:
With the decimation factor Δ c o l reducing the amount of pixels in the extracted signal to process, the latter must be carefully selected according to the oversampling factor of the camera in order to ensure the correct recovery of the information. There is therefore a trade-off to be made between the required processing time of the signal and the communication performance, especially with a poor contrast between the bright and dark strips due to the presence of noise.

3. Method Description

While several demodulation methods have been implemented to determine the width of bright and dark strips, dealing with the blooming effect through adaptive thresholds or first-order derivative, none of the proposed methods, to the best of authors’ knowledge, remain robust enough when the environment is becoming more complex. Hence, a new demodulation method is proposed with the aim of achieving greater robustness within complex environments in order to enhance OCC systems’ performance, therefore extending the range of possible applications. As illustrated in Figure 4, the proposed ZEROES method is based on a first-order derivative approach for the demodulation of the extracted signal (x). Indeed, the latter is firstly filtered and normalized ( x n ) in order to prepare and enhance the derivative computation. Then, from the peaks and valleys ( P V ) of the derivative ( x n ), representing its local maximums and minimums, associated zeros are deduced ( z e r o s ), where the slope of the extracted signal is constant, leading to the identification of the extracted signal boundaries ( b n d ). Finally, the switching point ( s w i t c h ) of the logical state is determined from the boundary positions by computing the intersection point between the signal and the constant straight line whose value is the average of the boundary points. Thus, the accurate detection of the signal boundaries through the zeros’ values of the derivative, combined with the optimal identification of the logical state switching points, therefore provides great robustness in demodulation with ZEROES.

3.1. Moving Average and Normalization

Since the ZEROES method intends to identify the zeros of the first-order derivative based on the positions of peaks and valleys, noisy variations of the extracted signal x result in short-term fluctuations that therefore interfere with a proper zeros’ detection (Figure 5). The extracted signal x shown in Figure 5 was obtained after the decimation of columns ( Δ c o l = 4 ) and rows ( Δ r o w = 100 ) of a 3040 × 4056 (N × M) resolution image in order to reduce the whole amount of data to process while reducing the noise. Then, a moving average was applied to smooth out the signal noise by computing an average value for each point based on the neighboring points with a sliding window W = P b , with . being the round operator.
x ¯ ( i ) = 1 2 W + 1 j = W W x ( i + j )
Thus, the moving average computed i [ W / 2 , N / Δ c o l W / 2 ] , with . being the floor operator, acts as a low-pass filter by attenuating the noisy high frequencies of the signal while preserving the low frequencies containing the transmitted information. Then, the moving averaged signal x ¯ is normalized in x n between 0 and 100 to ensure a proper upcoming zeros’ detection of the first-order derivative regardless of the transmission conditions.
x n ( i ) = x ¯ ( i ) x ¯ m i n x ¯ m a x x ¯ m i n × 100
with x ¯ m a x and x ¯ m i n being the maximum and minimum values of x ¯ , respectively.
As shown in Figure 6, the extracted signal after moving average filtering presents less noisy fluctuations while retaining sharp edges for the good of the demodulation. However, signal improvement is achieved only at the cost of a reduced extinction ratio, which affects the correct demodulation.

3.2. First-Order Differential Calculation

Once the extracted signal is correctly filtered by the moving average and shaped by normalization, the first-order derivative x n is computed while setting all the points with an absolute derivative value lower than the threshold T h to zero (Figure 7). In fact, removing the low-amplitude variations of the derivative provides an improvement in the identification of the logical state changes, lowering the probability of a false zeros detection. Since the derivative is computed on a normalized signal x n , the value of T h , defining the minimal amplitude of a lobe, remains the same from one image to another and is fixed to 1, assuming that the low noisy fluctuations derivative of the normalized signal would not exceed 1. However, the derivative thresholding results in the emergence of isolated points in the signal, characterized by a derivative sign different from its neighbor points. When a sudden change in the derivative sign occurs on a single point, the corrupted values of x n ( i ) become equal to the average of its neighboring values x n ( i 1 ) and x n ( i + 1 ) , as follows:
x n ( i ) = if s g n ( x n ( i ) ) s g n ( x n ( i 1 ) ) x n ( i 1 ) + x n ( i + 1 ) 2 , and s g n ( x n ( i ) ) s g n ( x n ( i + 1 ) ) i [ 1 , i m a x 1 ] x n ( i ) , otherwise
where s g n ( ) is the sign function. Then, the thresholding operation described above is once again repeated in order to eliminate the resulting values with an absolute value below T h .
As illustrated in Figure 7, the derivative filtering mechanism described above combined with the moving average ensures a nearly free-noise derivative by setting all the values between the red dotted lines to zero and smoothing the outlier values.

3.3. Detection of Peaks and Valleys

Due to the square-shaped waveform of the emitted signal, the first-order derivative x n is supposed to present alternating positive and negative lobes, respectively, indicating the rising and falling edges of the signal. Thus, a consecutive series of positive derivative values represents a positive lobe whose maximum value is a peak, while a consecutive series of negative derivative values represents a negative lobe whose minimum value is a valley (Figure 8). However, when the extracted signal x does not present sufficiently sharp edges due to a low contrast between strips, noise, or distortion, the detected peaks and valleys P V are not all necessarily valid, leading to demodulation errors if not taken into account. This is indeed the case for the peak surrounded by the blue circle in Figure 8.
Fortunately, these wrong peaks and valleys can be detected through two different criteria:
The amplitude difference between a successive peak/valley.
The alternating peak/valley pattern.
Thus, the validity of each peak and valley is checked by considering the P V value with the greatest amplitude m a x _ P V as being valid. Then, from m a x _ P V , p r e v _ P V and n e x t _ P V are determined, which are defined as the first peak/valley before and after m a x _ P V , respectively, with an absolute amplitude greater than or equal half | P V _ m a x | (Figure 9). Hence, the validity of each peak/valley is firstly checked with P V before p r e v _ P V , followed by those after n e x t _ P V (Figure 9). A peak/valley is only considered as valid if
P V ( i ) | P V ( i + 1 ) + P V ( i + 2 ) | 2 + T h
i [ p r e v _ P V 1 , 2 ] for p r e v _ P V validation; otherwise, i [ n e x t _ P V + 1 , N P V 2 ] for n e x t _ P V , while checking whether N P V is the number of P V that was previously detected. If a peak or valley does not satisfy this condition, it is not considered as a peak or valley anymore in order to prevent any false detection; otherwise, it is recorded in P V _ l e f t or P V _ r i g h t (Figure 9). Now that all the peaks and valleys are valid in terms of amplitude, the alternating peak/valley pattern must henceforth be checked. Indeed, in order to prevent these errors from happening, if two consecutive peaks or valleys are detected, only the portion of the derivative containing the most valid peak and valley is retained for further processing, as illustrated with the red area in Figure 9.
As clearly seen in Figure 9, only peaks and valleys corresponding to the actual rising/falling edges of the extracted signal are taken into account (red crosses), with the peaks and valleys with too low of an amplitude being left out. Moreover, in order to prevent transmission errors, the largest series including the alternating peak and valley pattern is retained, deliberately ignoring parts of the derivative that would cause errors (red zone).

3.4. Zeros’ Detection

Since peaks and valleys only provide imprecise information about the signal edges, by returning the position of the maximum or minimum variation between consecutive points, using them as an edge indicator therefore introduces an uncertainty about the total pixel length of states, which leads to demodulation errors. In order to achieve greater precision in the detection of edge position, zeros of a derivative, indicating the start and end of each state, are used instead. Indeed, two zeros’ values (before and after) are assigned to each peak/valley, corresponding to the extreme points of the associated lobe. Thus, the previous zero is defined as the first value before the peak/valley with a sign different from the peak/valley, while the next zero is defined as the first value after the peak/valley with a sign different from the peak/valley (blue squares in Figure 10).
However, when a state amplitude is not constant due to the blooming effect, especially in phases of increasing or decreasing light intensity, the associated slope is therefore not null. If the absolute slope value is ever above the threshold T h , it will not be filtered when computing the derivative (Section 3.2) and be considered as part of the lobe, distorting the zeros’ detection. In order to take this situation into account, a derivative point within a lobe is only considered as a zero if
| x n ( i ) | | P V | 2 a n d | x n ( i ) | T h o r s g n ( P V ) s g n ( x n )
with x n ( i ) being the derivative point of the associated P V . Thus, Figure 10 showsthe pair of zeros detected (blue squares) for each valid peak and valley. While all detected zeros correspond here to the sign change point with a null amplitude, it should be noted that this is not always the case, especially in complex environments, due to the detection condition of Equation (6).

3.5. Boundaries’ Detection

The position of the signal boundaries of x n , defined as the limit points of a logic state, is directly obtained from the indices of the zeros detected. With the aim of accurately detecting the edges of x n , the position of each boundary is adjusted according to the definition of signal rise time, characterizing the required time for the signal to switch from one state to another. Indeed, considering the absolute amplitude difference between boundaries from the same edge as b n d _ d i f f , the boundary of the low state is defined as the first value greater than or equal to the detected low boundary + 10% of b n d _ d i f f , while the boundary of the high state is defined as the first value less than or equal to the high boundary − 10% of b n d _ d i f f .
As illustrated with green diamonds in Figure 11, zeros of the derivative in association with the rise/fall time detected in the signal provide an accurate detection of the signal state boundaries, especially when a state’s amplitude is fluctuating.

3.6. Edges’ Detection

Achieving a great accuracy in the detection of the edges of the signal x n , corresponding to the switching instants of logical levels, provides a better robustness in the demodulation. Thus, as an edge represents the tipping point between an high and low level, or vice versa, its position is defined as the equidistant point along the signal x n between the associated boundaries (Figure 12). To do so, the average value of boundaries from a same edge is considered as the ordinate of the corresponding switch point, while its abscissa is determined by computing the intersection point between the rising/falling edge and the constant straight line of the s w i t c h value (Figure 12).
Thus, the slope a of the straight line passing through P h and P l , the first points of each edge higher than and lower than the associated s w i t c h value, respectively, and the corresponding y-intercept b are given by
a ( j ) = y P h y P l x P h x P l
b ( j ) = y P h ( j ) a ( j ) × x P h ( j )
Then, from the equation of a first-order function y = a x + b , the abscissa of the switch s w i t c h _ i d x is given by
s w i t c h _ i d x ( j ) = s w i t c h ( j ) b ( j ) a ( j )
As s w i t c h _ i d x is determined by the intersection of two straight lines, the position of the switch is therefore more accurate than just selecting the point of the edge closer to the s w i t c h value. As clearly shown in Figure 13, the switch points represented by red triangles oriented according to the rising or falling edges are indeed located halfway between the boundary points of the edges illustrated with green diamonds.

3.7. Demodulation

Finally, the precise detection of state switching points provides a demodulated signal with great accuracy, as shown in Figure 14, despite noise and the blooming effect distorting the extracted signal x.
Binary information is easily recovered from a demodulated signal using the P b value (introduced in Section 2), which is used to determine the number of bits contained in each state based on the number of pixels.

4. Experimental Setup

This section provides a comprehensive description of the experimental setup implemented to perform OCC transmission. In this study, both Line-Of-Sight (Figure 15a) and Non-Line-Of-Sight (Figure 15b) scenarios are considered, with a direct and indirect light transmission from the transmitter to the receiver, respectively. While the camera only receives light directly emitted by the LED source in LOS transmission, NLOS transmission takes advantage of the light reflections in the surrounding environment to increase the light source area within an image [23].

4.1. Transmission

In an attempt to reach the conditions of a real-world application, the implemented transmitter (TX) is build around the CILAOS LED panel from Holight [24]. The latter is specifically designed for indoor lightning and consists of 4 modules of 20 Surface-Mounted Device (SMD) LEDs connected in parallel to emit white light while a 30 × 30 cm polycarbonate sheet ensures uniform light diffusion. In the case of LOS transmission, the center of the LED panel is positioned at a height of 120 cm, facing the camera; in the NLOS scenario, the light source is situated 130 cm above the ground, facing a white wall with an orientation of 30° relative to the wall’s normal and at a distance of 110 cm from it. The OOK modulation of the emitted light is managed by the bulk controller for LED LM3409 from Texas Instruments [25], offering both analog and Pulse-Width Modulation (PWM) dimming to control the current powering the LED.
In order to facilitate the distinction between high and low logical levels emitted by the source, and therefore enhancing the bright and dark strips in the image, PWM dimming (consisting of successively turning on and off the LED panel) was implemented here to drive the LED. The STM32H7 microcontroller controls the LM3409 switching state by generating the message that needs to be transmitted at a data rate of 4 kbps, consisting of a 10-bit header and a 40-bit payload. The different parameters of the transmitter are summarized in Table 1.

4.2. Reception

The reception of LED brightness variations is operated by the Sony IMX477R 12MP image sensor of the Raspberry Pi HQ camera [26], equipped with a 6 mm wide-angle lens to cover a large view of the transmitter and its nearby environment. The camera is positioned at a height of 120 cm in each scenario, and it is positioned at a lateral distance of 105 cm from the LED panel in the case of NLOS transmission. Image capture is performed by a Raspberry Pi 4 through a Python program configuring the camera’s parameters based on the Picamera2 library. Image resolution is set to the maximum of 4056 × 3040, the frame rate is fixed to 40 fps, and the minimum exposure time of 1/16667 s is selected in order to achieve better contrast between the bright and dark strips. Since the ISO value mainly depends on ambient light, its parametrization must therefore be carried out in each environment; here, it is set at 5769. Considering that the image sensor is oriented in landscape mode, 90° clockwise rotation is applied on images to recover the usual vertical strips. Through the P b parameter, which is equal to 8.25 here, the bit period of the transmitted signal is known by the receiver. In order to minimize the whole processing time, images are decimated in both columns and rows ( Δ c o l = 4, Δ r o w = 100) to reduce their resolution (from 3040 × 4056 to 41 × 760). The different parameters of the receiver (RX) are summarized in Table 2.

5. Results

In order to evaluate the robustness and efficiency of the ZEROES method, experiments are conducted in both LOS and NLOS scenarios to measure its performance in terms of communication and execution times. These results are also compared to other demodulation methods—also based on the first-order derivative like BPBPLFT [12] and HS [13] or on an adaptive threshold with 3rd-OPF [11]—using the exact same ROI method (here, PCA) [19] to only see the effect of demodulation on performance. To achieve this, 300 images are captured for each camera position with a distance to the LED source ranging from 40 to 100 cm with a 10 cm step in LOS, while the distance from the camera to the wall (without considering LED/wall distance) increases from 50 to 450 cm with a 25 cm step in NLOS. All taken images are transferred to the computer in order to be post-processed by a Python program (available at [27]). As images taken in LOS are subject to chromatic aberration, images are converted in grayscale, while value representation is used in NLOS to enhance the strips’ contrast. While the efficiency is evaluated through the percentage of received bits, the robustness is measured with the Bit Error Rate, defined as the number of errors divided by the number of received bits. To ensure the statistical reliability of the BER measurement, only the BER values computed with a minimum of 10 errors are considered in the results. Furthermore, in order to provide a clearer visualization of the BER and percentage of received bits as a function of the distance, an extrapolation curve is plotted for each demodulation method (Figure 16, Figure 17, Figure 18 and Figure 19).

5.1. Line of Sight

Due to the number of bits missed during the IFG (indicated by the red area in Figure 16) and the ones lost during the transmission itself, the camera can never receive 100% of the transmitted data. In fact, while the percentage of received bits of the demodulation methods remains relatively stable, evolving between 87 and 90%, ZEROES tends to lose more data as the distance increases from 60 cm, receiving only 82.2% of the transmitted data at 100 cm. This result difference is explained by the fact that ZEROES deliberately does not consider the bits identified as incorrect in order to minimize transmission errors.
Figure 16. Received bits of demodulation methods in LOS.
Figure 16. Received bits of demodulation methods in LOS.
Photonics 11 00949 g016
Indeed, while the BER of the demodulation methods tends to increase as a function of distance, except for BPBPLFT, the ZEROES method outperforms the others in the received errors under a distance of 75 cm, at a point where BPBPLFT reaches same performance. In order to better compare the methods’ performance, a maximum BER of 10−3 (indicated by the red dashed line in Figure 17) serves as reference since it ensures error-free transmission when employing traditional error-correcting codes. Thus, of all the implemented methods, ZEROES is the only one reaching a BER of 10−3 at a distance of about 50 cm from the LED source (Figure 17).
Figure 17. Bit Error Rate of demodulation methods in LOS.
Figure 17. Bit Error Rate of demodulation methods in LOS.
Photonics 11 00949 g017
However, in this case, only 87.3% of the transmitted data are received. In comparison with the BPBPLFT method at the same distance, 89.7% of the data are received but with a BER of 9.9 × 10−3. Therefore, the additional loss of 7.5% in the received bits introduced by ZEROES is largely compensated by receiving approximately 10 times less errors in the data.

5.2. Non Line of Sight

Similarly to the results obtained in LOS, the same variations in the percentage of received bits as a function of the distance are also observed in NLOS (Figure 18). Indeed, while other methods receive a stable amount of bits when increasing the communication distance between 87 and 90%, ZEROES is rather stable until 300 cm receiving approximately 86% of the data before losing more bits with the distance, reaching 80.5% at 450 cm.
Figure 18. Received bits of demodulation methods in NLOS.
Figure 18. Received bits of demodulation methods in NLOS.
Photonics 11 00949 g018
However, in comparison with LOS results, 3rd-OPF and HS methods still present similar performance but without being able to reach a BER less than 10−3 over the entire measurement range (Figure 19). However, BPBPLFT reaches this value at a distance around 230 cm, while the BER of ZEROES is less than 10−3 until 330 cm, increasing the maximum achievable distance by 43.5%.
Hence, taking BPBPLFT as reference at this distance (330 cm), the loss of 3% in the received data with the use of ZEROES is once again largely compensated by a number of errors in the received data being reduced by a factor of about 7. Thus, ZEROES improves the communication distance of the transmission but at the cost of a reduced number of received bits. There is therefore a trade-off to deal with between the effective data rate and the number of transmission errors for the ZEROES method.
Figure 19. Bit Error Rate of demodulation methods in NLOS.
Figure 19. Bit Error Rate of demodulation methods in NLOS.
Photonics 11 00949 g019

5.3. Execution Time

Regarding the execution time of each method, the runtime of a hundred executions is measured, but only the median time is considered in order to avoid the effect of a non-real-time execution. The experiment was conducted on a HP-ZBook-17-G2 equipped with a 2.8 GHz Intel Core i7 4810MQ processor, 32 GB RAM, running the Ubuntu 20.04 64-bit version. The results displayed in Figure 20 show that PCA combined with ZEROES is the most time-consuming method, taking 4.7 ms to process one image, which is approximately 5 times lower than the time between each image capture when considering a frame rate of 40 fps (1/40 = 25 ms). Therefore, the ZEROES method remains fully compliant with a real-time OCC application, considering both the gain in communication performance and the short execution time of the proposed method.

6. Discussion

The main limitation of a correct demodulation of OCC images based on rolling shutter lies in the blooming effect. The aim of this work was to implement a new demodulation method, named ZEROES, which relies on the first-order derivative of the extracted signal to accurately detect changes in signal states while removing the blooming effect. The conducted experiments demonstrated the robustness of the ZEROES method by comparing its performance to other demodulation methods while using the same PCA method for ROI detection. The obtained results show that the ZEROES method outperforms other methods in both LOS and NLOS scenarios by achieving a target BER of 10−3 in LOS at a distance of approximately 50 cm (when other methods cannot), and by increasing the communication distance in NLOS by 43.5% compared to BPBPLFT. However, the robustness of the ZEROES method against transmission errors results in a reduced effective data rate, receiving 85.5% of the transmitted data with a BER of 10−3 at 330 cm, while BPBPLFT achieves 89.9% at a shorter distance of 230 cm. Therefore, the combination of PCA and ROI with the ZEROES demodulation method paves the way for the use of OCC in daily life, especially in NLOS scenarios, with execution times being compatible with real-time applications.

Author Contributions

Methodology, M.D.M.; Investigation, M.D.M.; Resources, H.B.; Writing—review and editing, H.B. and A.J.-V.; Supervision, H.B. and A.J.-V. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the VEEPI Regional Project of Nouvelle-Aquitaine under grant AAPR2021A-2020-12026410.

Data Availability Statement

The source code implementing all the methods employed in this work is available on GitLab at https://gitlab.xlim.fr/mdemur01/occ_zeroes.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
3rd-OPFThird-Order Polynomial Fitting
BERBit Error Rate
BPBPLFTBoundary Pixel-Based Piecewise Linear Function
CCDCharge-Coupled Device
CMOSComplementary Metal-Oxide Semiconductor
ERExtinction Ratio
HSHyperSight
HSVHue saturation value
IFGInter-Frame Gap
IoTInternet of Things
ISOInternational Standard Organization
LEDLight-Emitting Diode
LOSLine Of Sight
NLOSNon Line Of Sight
OCCOptical Camera Communication
OOKOn–Off Keying
OWCOptical Wireless Communication
PCAPrincipal Component Analysis
PWMPulse-Width Modulation
RFRadio Frequency
RGBRed Green Blue
ROIRegion Of Interest
SMDSurface-Mounted Device
V2VVehicle-to-Vehicle
VLCVisible Light Communication
ZEROESZeros Evaluation for Robust and Optimal Edges Selection

References

  1. Nardelli, A.; Deuschle, E.; de Azevedo, L.D.; Pessoa, J.L.N.; Ghisi, E. Assessment of Light Emitting Diodes technology for general lighting: A critical review. Renew. Sustain. Energy Rev. 2017, 75, 368–379. [Google Scholar] [CrossRef]
  2. Pons, M.; Valenzuela, E.; Rodríguez, B.; Nolazco-Flores, J.A.; Del-Valle-Soto, C. Utilization of 5G Technologies in IoT Applications: Current Limitations by Interference and Network Optimization Difficulties—A Review. Sensors 2023, 23, 3876. [Google Scholar] [CrossRef] [PubMed]
  3. Matheus, L.E.M.; Vieira, A.B.; Vieira, L.F.M.; Vieira, M.A.M.; Gnawali, O. Visible Light Communication: Concepts, Applications and Challenges. IEEE Commun. Surv. Tutor. 2019, 21, 3204–3237. [Google Scholar] [CrossRef]
  4. Chowdhury, M.Z.; Hossan, M.T.; Islam, A.; Jang, Y.M. A Comparative Survey of Optical Wireless Technologies: Architectures and Applications. IEEE Access 2018, 6, 9819–9840. [Google Scholar] [CrossRef]
  5. Saeed, N.; Guo, S.; Park, K.-H.; Al-Naffouri, T.Y.; Alouini, M.-S. Optical camera communications: Survey, use cases, challenges, and future trends. Phys. Commun. 2019, 37, 100900. [Google Scholar] [CrossRef]
  6. Danakis, C.; Afgani, M.; Povey, G.; Underwood, I.; Haas, H. Using a CMOS camera sensor for visible light communication. In Proceedings of the 2012 IEEE Globecom Workshops, Anaheim, CA, USA, 3–7 December 2012; pp. 1244–1248. [Google Scholar]
  7. Durini, D. High Performance Silicon Imaging. Fundamentals and Applications of CMOS and CCD Sensors, 1st ed.; Woodhead Publishing Series in Electronic and Optical Materials; Elsevier Ltd., Woodhead Publishing: Sawston, UK, 2014. [Google Scholar]
  8. Chow, C.-W.; Chen, C.-Y.; Chen, S.-H. Visible light communication using mobile-phone camera with data rate higher than frame rate. Opt. Express 2015, 23, 26080–26085. [Google Scholar] [CrossRef] [PubMed]
  9. Kuo, Y.-S.; Pannuto, P.; Hsiao, K.-J. Luxapose: Indoor positioning with mobile phones and visible light. In Proceedings of the 20th Annual International Conference on Mobile Computing and Networking, Maui, HI, USA, 7–11 September 2014. [Google Scholar]
  10. Hu, X.; Zhang, P.; Sun, Y.; Deng, X.; Yang, Y.; Chen, L. High-Speed Extraction of Regions of Interest in Optical Camera Communication Enabled by Grid Virtual Division. Sensors 2022, 22, 8375. [Google Scholar] [CrossRef] [PubMed]
  11. Liu, Y.; Chow, C.-W.; Liang, K.; Chen, H.-Y.; Hsu, C.-W.; Chen, C.-Y.; Chen, S.-H. Comparison of thresholding schemes for visible light communication using mobile-phone image sensor. Opt. Express 2016, 24, 1973–1978. [Google Scholar] [CrossRef] [PubMed]
  12. Zhang, Z.; Zhang, T.; Zhou, J.; Lu, Y.; Qiao, Y. Thresholding Scheme Based on Boundary Pixels of Stripes for Visible Light Communication With Mobile-Phone Camera. IEEE Access 2018, 6, 53053–53061. [Google Scholar] [CrossRef]
  13. Meng, Y.; Chen, X.; Pan, T.; Shen, T.; Chen, H. HyperSight: A Precise Decoding Algorithm for VLC with Mobile-Phone Camera. IEEE Photonics J. 2020, 12, 7904211. [Google Scholar] [CrossRef]
  14. Wang, S.; Liu, J.; Zheng, X.; Yang, A.; Song, Y.; Guo, X. Non-Threshold Demodulation Algorithm for CMOS Camera-based Visible Light Communication. In Proceedings of the Opto-Electronics and Communications Conference (OECC), Taipei, Taiwan, 4–8 October 2020; pp. 1–3. [Google Scholar]
  15. Hossan, T.; Chowdhury, M.Z.; Islam, A.; Jang, Y.M. A Novel Indoor Mobile Localization System Based on Optical Camera Communication. Wirel. Commun. Mob. Comput. 2018, 2018, 9353428. [Google Scholar] [CrossRef]
  16. Hasan, M.K.; Ali, M.O.; Rahman, M.H.; Chowdhury, M.Z.; Jang, Y.M. Optical Camera Communication in Vehicular Applications: A Review. IEEE Trans. Intell. Transp. Syst. 2022, 23, 6260–6281. [Google Scholar] [CrossRef]
  17. Teli, S.R.; Matus, V.; Zvanovec, S.; Perez-Jimenez, R.; Vitek, S.; Ghassemlooy, Z. Optical Camera Communications for IoT–Rolling-Shutter Based MIMO Scheme with Grouped LED Array Transmitter. Sensors 2020, 20, 3361. [Google Scholar] [CrossRef] [PubMed]
  18. Nguyen, H.; Pham, T.L.; Nguyen, H.; Jang, Y.M. Trade-off Communication distance and Data rate of Rolling shutter OCC. In Proceedings of the 11th International Conference on Ubiquitous and Future Networks (ICUFN), Zagreb, Croatia, 2–5 July 2019; pp. 148–151. [Google Scholar]
  19. De Murcia, M.; Boeglen, H.; Julien-Vergonjanne, A.; Combeau, P. Principal Component Analysis for Robust Region-of-Interest Detection in NLOS Optical Camera Communication. In Proceedings of the 14th International Symposium on Communication Systems, Networks and Digital Signal Processing (CSNDSP), Rome, Italy, 17–19 July 2024; pp. 383–388. [Google Scholar]
  20. Van, L.T.; Emmanuel, S.; Kankanhalli, M.S. Identifying Source Cell Phone using Chromatic Aberration. In Proceedings of the IEEE International Conference on Multimedia and Expo, Beijing, China, 2–5 July 2007; pp. 883–886. [Google Scholar]
  21. Duque, A.; Stanica, R.; Rivano, H.; Desportes, A. Decoding methods in LED-to-smartphone bidirectional communication for the IoT. In Proceedings of the Global LIFI Congress (GLC), Paris, France, 8–9 February 2018; pp. 1–6. [Google Scholar]
  22. Li, X.; Liu, W.; Xu, Z. Design and Implementation of a Rolling Shutter Based Image Sensor Communication System. In Proceedings of the IEEE/CIC International Conference on Communications in China (ICCC Workshops), Chongqing, China, 9–11 August 2020; pp. 253–258. [Google Scholar]
  23. Yang, Y.; Nie, J.; Luo, J. Reflexcode: Coding with superposed reflection light for led-camera communication. In Proceedings of the 23th ACM MobiCom, Snowbird, UT, USA, 16–20 October 2017. [Google Scholar]
  24. Holight. CILAOS Product Sheet. Available online: https://www.holight.com/wp-content/uploads/2022/02/CILAOS-2022.pdf (accessed on 1 January 2023).
  25. Texas Instruments. LM3409, -Q1, LM3409HV, -Q1 P-FET Buck Controller for High-Power LED Drivers. Datasheet, Revised June 2016. Available online: https://www.ti.com/lit/ds/symlink/lm3409.pdf?ts=1728389746781&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FLM3409 (accessed on 25 September 2024).
  26. Raspberry Pi. Raspberry Pi High Quality Camera. Datasheet, January 2023. Available online: https://datasheets.raspberrypi.com/hq-camera/hq-camera-product-brief.pdf (accessed on 25 September 2024).
  27. De Murcia, M. “mdemur01/OCC_ZEROES”, Initial Release, GitLab. Available online: https://gitlab.xlim.fr/mdemur01/occ_zeroes (accessed on 25 September 2024).
Figure 1. Schematic representation of OCC reception side.
Figure 1. Schematic representation of OCC reception side.
Photonics 11 00949 g001
Figure 2. Comparison of the image representation impact on chromatic aberration.
Figure 2. Comparison of the image representation impact on chromatic aberration.
Photonics 11 00949 g002
Figure 3. Illustration of the IFG.
Figure 3. Illustration of the IFG.
Photonics 11 00949 g003
Figure 4. Flowchart diagram of ZEROES method.
Figure 4. Flowchart diagram of ZEROES method.
Photonics 11 00949 g004
Figure 5. Representation of the extracted signal.
Figure 5. Representation of the extracted signal.
Photonics 11 00949 g005
Figure 6. Representation of the extracted signal after moving average filtering and normalization.
Figure 6. Representation of the extracted signal after moving average filtering and normalization.
Photonics 11 00949 g006
Figure 7. Representation of the first-order derivative after filtering.
Figure 7. Representation of the first-order derivative after filtering.
Photonics 11 00949 g007
Figure 8. Representation of the positive and negative lobes of the first-order derivative (only a part of x n is plotted for better readability).
Figure 8. Representation of the positive and negative lobes of the first-order derivative (only a part of x n is plotted for better readability).
Photonics 11 00949 g008
Figure 9. Representation of the detected peaks and valleys of the first-order derivative.
Figure 9. Representation of the detected peaks and valleys of the first-order derivative.
Photonics 11 00949 g009
Figure 10. Representation of the zeros of first-order derivative.
Figure 10. Representation of the zeros of first-order derivative.
Photonics 11 00949 g010
Figure 11. Representation of the normalized extracted signal boundaries.
Figure 11. Representation of the normalized extracted signal boundaries.
Photonics 11 00949 g011
Figure 12. Representation of switch points’ detection (only two switches are plotted for better readability).
Figure 12. Representation of switch points’ detection (only two switches are plotted for better readability).
Photonics 11 00949 g012
Figure 13. Representation of the switch points detected from the normalized extracted signal.
Figure 13. Representation of the switch points detected from the normalized extracted signal.
Photonics 11 00949 g013
Figure 14. Representation of the demodulated signal.
Figure 14. Representation of the demodulated signal.
Photonics 11 00949 g014
Figure 15. Experimental setup in different configurations.
Figure 15. Experimental setup in different configurations.
Photonics 11 00949 g015
Figure 20. Comparison of median execution time of demodulation methods.
Figure 20. Comparison of median execution time of demodulation methods.
Photonics 11 00949 g020
Table 1. Summary of TX parameters.
Table 1. Summary of TX parameters.
TX ParametersLOSNLOS
LED power19.91 W19.91 W
Panel dimension30 × 30 cm30 × 30 cm
Panel height120 cm130 cm
Panel/wall distance/110 cm
Panel/wall orientation/30°
Header10 bits10 bits
Payload40 bits40 bits
Data rate4 kbps4 kbps
ModulationOOKOOK
Table 2. Summary of RX parameters.
Table 2. Summary of RX parameters.
RX ParametersLOSNLOS
CameraRaspberry Pi HQRaspberry Pi HQ
Camera height120 cm120 cm
Camera/LED lateral dist./105 cm
Resolution4056 × 30404056 × 3040
Focal length6 mm6mm
Frame rate40 fps40 fps
Exposure time1/16667 s1/16667s
T s h u t t e r 23.3 ms23.3 ms
ISO57695769
Average ambient light1173 lx3724 lx
P b 8.258.25
Δ c o l , Δ r o w 4, 1004, 100
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

De Murcia, M.; Boeglen, H.; Julien-Vergonjanne, A. ZEROES: Robust Derivative-Based Demodulation Method for Optical Camera Communication. Photonics 2024, 11, 949. https://doi.org/10.3390/photonics11100949

AMA Style

De Murcia M, Boeglen H, Julien-Vergonjanne A. ZEROES: Robust Derivative-Based Demodulation Method for Optical Camera Communication. Photonics. 2024; 11(10):949. https://doi.org/10.3390/photonics11100949

Chicago/Turabian Style

De Murcia, Maugan, Hervé Boeglen, and Anne Julien-Vergonjanne. 2024. "ZEROES: Robust Derivative-Based Demodulation Method for Optical Camera Communication" Photonics 11, no. 10: 949. https://doi.org/10.3390/photonics11100949

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop