Experimental Investigation of Neuron Based Motion Detection in Internet of Things using Optical Camera Communications

This paper experimentally investigates the performance of visible light based optical camera communications (OCC) link with motion detection (MD) for the optical Internet of things applications. This efficient MD can be considered another functionality of OCC in addition to traditional features of vision, illumination data communications and sensing. The experiments were conducted in an indoor static downlink OCC system employing a mobile phone front camera is employed as the receiver and an $8\times 8$ red, green, and blue (RGB) light-emitting diode array as the transmitter. The motion is detected by observing the user's finger movement in the form of centroid through the OCC link via a camera. The experiment results demonstrate that, the proposed scheme can detect all considered motions accurately with acceptable bit error rate (BER) performances at a transmission distance of up to 80 cm. We show a BER of $1.7\times 10^{-3}$ below the forward error correction limit of $3.8\times 10^{-3}$ over a transmission distance of up to 1 m. The proposed neuron based MD combined together with OCC can be considered an efficient system, which provides illumination, communications, and motion detection in a convenient smart home environment.


I. INTRODUCTION
The smartphone or camera based visible light communications (VLC) termed as optical camera communications (OCC) has been studied within the framework of optical wireless communications and is considered in IEEE 802.15.7rl standard [1,2].The VLC and OCC using visible light spectrum (~370-780 nm), is an emerging technology within 5G wireless communication networks [3].Due to the large scale and increasing availability of mobile phones, smartphone VLC or OCC can be attractive, as nearly six billions of smartphones have been sold worldwide so far [4].The OCC utilizes a mobile phone CMOS camera as the receiver and can, therefore [5] capture two-dimensional data in the form of image sequences, thus being able to transmit more dimensional information compared to photodetector-based VLCs.VLC and OCC with huge frequency spectrum integrated with the internet of things (IoT) can open up a wide range of indoor as well as outdoor applications using optical transmission links.It can be therefore termed as Optical IoT.Viable applications of OCC in Optical IoT based networks represent smart homes using a light emitting diode (LED), mobile atto-cells, vehicle-to-everything (V2X), smart surveillance systems, etc. OCC offers interesting functionalities of vision, data communications, localization and motion detection [6][7][8].The concept of motion detection has been studied as an addon functionality both in OCC and VLCs along with the provision of illumination and short-range wireless communications [6,7].The latter is termed as motion over a camera [6], which can also be used for controlling signal transmission in IoT networks.In conjunction with smart home applications, the motion detection based on existing VLC and OCC links can be useful to control smart devices [6][7][8][9][10].The motion detection over existing VLC or OCC links seems more natural, convenient, and cost-effective, compared with other user interface methods.
In OCC, image processing is essential and critical for detection and recovery of the transmitted information in the form of captured image frames.Thus, there is a need for robust and reliable image processing techniques and algorithms.Recently, we have seen growing progress in the neural network (NN) based image and pattern recognition techniques due to large-scale annotated datasets and the recent revival of deep convolutional NN for computer-aided detections [11,12].In this scheme, an artificial neuron within the hidden layers represents the main constituent, which receives multiple input samples in order to train the NN.In addition, NN in the form of trained neurons plays an important role in motion detection (MD) in indoor OCC links [7].Along with image processing, an artificial neural network (ANN) equalizer when used in VLC, can achieve higher data rates by reducing the effect of multipath induced intersymbol interference (ISI) [13].
In [7], we outlined the comparison of MD based on images and centroid data samples (both were considered as the input to NN representing the motion).In this paper, we focus on the analysis of neuron based MD in OCC by considering the training parameters for the processing time, the iterations carried out by NN for MD, accuracy of MD and the OCC communications link quality in terms of the bit error rate (BER) performance with respect to the transmission range.Unlike conventional NN schemes [12,14], the proposed NN for MD is trained not with motion images itself but with centroid data samples [7], thus providing more accurate detection and avoiding complex algorithms.For the current analysis, experiments were conducted for an indoor static downlink OCC link, where a mobile phone front camera was used as the receiver (Rx).We demonstrate highly accurate MD for a 1 m OCC link with a processing time of 7 s and 10,000 training iterations in terms of epochs.The proposed neuron based MD can be used for control of data communications in Optical IoT networks.

II. PROPOSED NEURON BASED MD IN OPTICAL IOT
Figure 1 illustrates a block diagram of the proposed neuron-based MD for Optical IoT.The data in an on-off keying format is used for intensity modulation of a 8 × 8 red, green and blue (RGB) LED array.At the Rx, a smartphone's front camera with a frame rate of 30 frames per second (fps) and with a resolution of 1920 × 1080 pixels is used to capture the images (i.e., a video stream) of intensity modulated LED array.To overcome blocking or shadowing due to mobility we have adopted a transmit data compensation scheme, which is based on the anchor LEDs (four per frame) and a synchronization LED in the first frame as in [7].
The motion is created by the user moving fingers over the camera as shown in Fig. 1.In addition to detecting the transmitted data, the camera captures the motion in the form of a video stream, which is then divided into frames for post-processing using MATLAB.Using the tracking function, the motion is tracked and is expressed in terms of centroids coordinates, which are then fed to the two hidden layers of NN with 20 and 2 neurons, respectively, for training.We obtained the centroid coordinates by averaging 20 experimental results performed over different transmission distances.The hidden layers of NN are used to detect and identify the user's motion.The NN can be utilized to identify only predefined motions, therefore the system can be pretrained using the centroid coordinate data samples (obtained from the performed motion) to improve MD's capability.Here, we consider only two simple motions -linear and circular, which correspond to 20 centroid coordinate data samples (i.e., 10 samples per defined motions) for training the NN.The NN training is based on a variable learning rate backpropagation algorithm [14], which uses the previous output as feedback to predict the next training output.The output of the NN training process is then expressed in the form of two-bit training labels representing the two predefined motions (i.e., linear and circular).

III. RESULTS
Table 1 shows the system parameters used while performing experiments and processing the image frames for neuron based MD and determining the quality of transmission.The parameters listed in Table 1 were considered while performing experiments and post-processing.Figure 2 shows the experiment results for motion centroids for circular and linear motions.The detected motion centroids in black points represent the tracked motion of the user's finger moving over the smartphone's front camera during OCC data transmission.These centroids represent the circular and straight line motions performed by the user.Figure 3 depicts results for the overall MD system performance with respect to the training iterations, with the training goal being set to achieve no errors.As can be observed from Fig. 3 (a) we have achieved 100 % MD accuracies of 100 % and 97 % for transmission spans of 60 cm and 1m, respectively.Note that, the best performance is achieved with the minimum training iteration (epochs) of 4000, a processing time of 4 s and 100 % accuracy over minimum transmission span of 30 cm.As illustrated in Fig. 3 (b), the learning rate of the NN is the decreasing function of processing time dropping from 0.1 to 0.01 for the processing times of 4 and 7 s, respectively.Since the proposed scheme offers simultaneous indoor OCC communications and MD, next, we evaluate the link's BER performance.Note that, the user's motion results in partial shadowing of the OCC link, which ultimately affects the link's BER.The link's BER deterioration is improved at the Rx by adopting a simple algorithm of the repeat request, when any one of the four corner anchor LEDs (see Fig. 1) in each frame is not detected at the receiver.Figure 4 shows the BER performance against the transmission distances.It can be seen that error-free data transmission is achieved at a transmission distance of up to 50 cm.For longer distances of 80 cm the measure BER is 1.7 × 10 -3 , which is below the forward error correction (FEC) limit of 3.8 × 10 -3 .For accurate MD over longer distances more complex recovery schemes need to be employed but at the cost of increased processing times while reducing the learning rate of NN.

IV. CONCLUSION
The experimental investigation of the performance of neuron based MD for Optical IoT was studied.The performance was evaluated in terms of the training time window, training iterations (epochs), MD accuracy, and BER performance were investigated.The best performance was achieved with the minimum training iteration (epochs) of 4000, a processing time of 4 s and 100 % accuracy over a minimum transmission span of 30 cm.We also showed that using a simple recover algorithm an acceptable MD accuracy (i.e., 99.2 %) together with high-quality data communications (i.e., a BER of 1.7 × 10 -3 , which is below the FEC limit of 3.8 × 10 -3 ) can be achieved at a transmission span of 80 cm.The NN for MD analysis can be further extended for more complex motions that can be considered suitable to offer practical and convenient indoor smart home environments.Increasing link spans based on various pattern recognition algorithms associated with ANN and using different transmitter configurations needs to be further investigated as part of the future works.

Fig. 1 .
Fig. 1.A block diagram of the proposed neuron based MD for optical IoT.

Fig. 3 .
Fig. 3. Performance analysis with respect to training iterations: (a) the transmission distance and the MD accuracy, and (b) the processing time and the learning rate.

Fig. 4 .
Fig. 4. The BER performance as a function of the transmission span.