## 3 System Principle and Realization  
The structure diagram of system is shown in Figure 3. The whole system is mainly composed of two parts: the transmitter and the receiver. The transmitter uses MATLAB to code video frame sequence based on the distributed compressive sensing theory. The encoded data are transmitted to FPGA (DIGILENT, ZYNQ-7000) via LWIP protocol, FPGA of the transmitter performs OOK (On-Off Keying) modulation on LED (CREE, Q5) through the driving circuit. The receiver transforms the discrete photon pulses into continuous bit information by utilizing the time interval of photons arrival, and then sends the continuous bit information to MATLAB for decoding via LWIP protocol. The principles of restoring the signal is shown in Figure 4. The timing of signal extraction method has the following steps: (1) To facilitate sampling with a 50 M clock, the single-photon pulse signal output by the detector is stretched. The width of stretched single-photon pulse signal is greater than 40 ns. (2) The FPGA sets a threshold \"T\" whose type is time interval. The trailing demodulator outputs a signal \"1\" when the stretched single-photon pulse signal is detected, and if FPGA can detect the next stretched signal within \"T\", the trailing demodulator keeps on outputting the signal \"1\" until the stretched signal does not arrive during the \"T\". Then, the trailing demodulator outputs signal \"0\". (3) The FPGA sends the trailing demodulation signal to the shift register whose width of the right shift is \"T\". Moreover, \"T\" is also the redundant length of the tail demodulation signal. Then, the shift registers output signal and the trailing demodulation signal are logically AND to obtain a true demodulated signal. (4) The above operation is repeated. Figure 3: The structure diagram of system. LED, led lamp; SPCM, single photon counter module; FPGA, field programmable gate array; JSCCRDCVS, joint source and channel coding scheme based on residual distributed compressive video sensing; LWIP, a lightweight TCP/IP stack; PC, personal computer. Figure 5 draws a practical picture of photon-counting underwater optical wireless communication system. PC1 uses the MATLAB platform to encode the video based on the distributed compressive sensing theory. Then, the measured values are converted into data frames, which are loaded into the integrated transmitter via the network port. In the system, OOK modulation method is utilized and the LED driving circuit is applied to transform the encoded binary bit stream into optical signal. The length of cylindrical water tank is 150 cm, which is filled with still pure water. After the optical signal passing through the water tank to the single photon detector, the single photon detector receives the extremely weak optical signal and outputs the discrete single photon pulse sequence. A specially designed demodulator extracts data from discrete single photon pulse sequences at the integrated receiver. The data arrive at PC2 via the network port. PC2 uses the MATLAB platform to decode the received data stream and restore the measured value. Finally, the video frames are reconstructed and the video is restored. Comparing the reconstructed video frames with the original images, the image quality assessment is usually divided into two categories: subjective quality evaluation and objective quality evaluation. Subjective quality evaluation depends on the human eye's intuitive perception of the image [26]. Figure 4: Timing of signal extraction: (**a**) single-photon pulse signal output by the detector; (**b**) stretched single-photon pulse signal; (**c**) trailing demodulated signal; (**d**) shift register output signal; and (**e**) demodulated signal. Figure 5: Photon-counting underwater optical wireless communication system. Objective quality evaluation depends on formula, such as mean-square error (MSE), Peak Signal to Noise Ratio (PSNR) and so on.