A system for the one-way transmission of information between river and sea vessels based on free-space optical communication (FSO). An LED transmitter connected to a laptop or a PC encodes the digital signal. A standard webcam is used as the receiver. We were assigned the task of designing an algorithm to process video frames according to the proposed information encoding model, and to develop software to decode this information.
The essence of this information encoding model lies in manipulating the gamma and brightness of the LEDs. The blue and red brightness levels are used for level 0/1 encoding, and the green colour level is used as a sync signal.
The green LED marks every bit of a byte with a different level of intensity. The levels are arranged in such a way that the ratio of the current level to the next one produces a unique number, identifying one of the 8 bits in a byte.
A calibration sequence consisting of 8 frames is transferred before every packet of 3 bytes is transmitted. It also takes 8 frames to transfer every byte. The transfer rate of useful information is 22.5 bits per second.
Initially, the client's idea was to search for a light spot within the frame and later analyse this spot, but practice showed that this algorithm was non-viable as the process is very resource-intensive. There is no need, however, to determine the physical boundaries of the light spot.
Over the course of development EDISON's specialists proposed and designed a new algorithm based on an estimate of the brightness of the entire frame in comparison to previous ones. In addition to this, we developed filters which cut off information from the non-target part of the image and eliminate noise. The basis of the proposed algorithm is as follows:
- A source frame in which the LED is turned off is chosen. This frame is thereafter used as the base and subtracted from subsequent frames;
- When there is a frame in which the total amount of information remaining after subtraction exceeds the set threshold, which indicates that an LED is turned on, further calculations are performed;
- A completely illuminated white spot and the entire permanent background of the source frame are removed from the found frame. Only the halo of the light spot remains on the resulting image;
- Any noise remaining outside the halo is filtered with a pre-set, adjustable brightness threshold;
- The gamma of the halo and the intensity of the glow of each colour component are determined, and these parameters are then used to decode the information transmitted by the frame.
Over the course of development of the prototype, it was concluded that the proposed method for transmitting information using LEDs could be used in practice. Algorithms have been developed, allowing information to be read and decoded from video streams of this type.