# Time Delay Optimization of Compressing Shipborne Vision Sensor Video Based on Deep Learning
## 3 Compression Experiment of Shipborne Vision Sensor Video
### Compression Performance Analysis  
In order to test the performance of HEVC compressed SVSV, and the impact of different scenes, different resolutions, and different Quantization Parameter (QP) values on the compression performance, the LDP mode was used to analyze the performance of compressed SVSV, and the test evaluation indexes contain Bitrate, Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index Measure (SSIM), where the calculation formula of PSNR and SSIM are given in Equations (5) and (6). The experimental platform is the same as Section 3.2. For the encoder configuration, the LDP default configuration is used for encoding, and the average of all the measured results is taken as the final result. Table 4 shows the performance comparison results of compressing different scenes and different resolutions of SVSVs with the same QP value. Figure 7 shows the R-D plots of SVLC video with resolution 1920 \(\times\) 1080 and SIRC video with resolution 704 \(\times\) 576 in the anchoring scenario with different QP values (22, 27, 32 and 37). Figure 8 shows the quality comparison of the first frame image in the SVLC video with 1920 \(\times\) 1080 resolution in the anchoring scene before and after encoding at the four QPs. \[\text{PSNR}=10\cdot lg\frac{M\cdot N\cdot A^{2}}{\sum_{n=0}^{N-1}\sum_{m=0}^{M -1}\left[f(m,n)-\hat{f}(m,n)\right]^{2}} \tag{5}\]  
where \(M\) and \(N\) are the width and height of the video image, \(f(m,n)\), \(\hat{f}(m,n)\) are the video images before and after compression respectively. \(A\) is the grayscale value of the video image. \[\text{SSIM}(x,y)=\frac{\left(2\mu_{x}\mu_{y}+C_{1}\right)\left(2\sigma_{xy}+C_ {2}\right)}{\left(\mu_{x}^{2}+\mu_{y}^{2}+C_{1}\right)\left(\sigma_{x}^{2}+ \sigma_{y}^{2}+C_{2}\right)} \tag{6}\]  
\[l(x,y)=\frac{2\mu_{x}\mu_{y}+C_{1}}{\mu_{x}^{2}+\mu_{y}^{2}+C_{1}} \tag{7}\]  
\[c(x,y)=\frac{2\sigma_{x}\sigma_{y}+C_{2}}{\sigma_{x}^{2}+\sigma_{y}^{2}+C_{2}} \tag{8}\]  
\[s(x,y)=\frac{2\sigma_{xy}+C_{3}}{\sigma_{x}\sigma_{y}+C_{3}} \tag{9}\]  
where \(l(x,y)\) is the brightness comparison function, whose expressions are given in Equation (7); \(c(x,y)\) is the contrast comparison function, given in Equation (8); \(s(x,y)\) is the structure comparison function, given in Equation (9). \(\mu_{x}\) and \(\mu_{y}\) are the average intensity before and after compression, which expressions are given in Equation (10); \(\sigma_{x}\), \(\sigma_{y}\) are the standard deviations, given in Equation (11); \(\sigma_{xy}\) is the covariance, given in Equation (12); \(C_{1}\), \(C_{2}\) and \(C_{3}\) are the constants. \[\mu_{x/y}=\frac{1}{N}\sum_{i=1}^{N}x_{i}/y_{i} \tag{10}\]  
\[\sigma_{x/y}=\frac{1}{N-1}\sum_{i=1}^{N}\left(x_{i}/y_{i}-\mu_{x}/\mu_{y} \right)^{2} \tag{11}\]  
\[\sigma_{xy}=\frac{1}{N-1}\sum_{i=1}^{N}\left[(x_{i}-\mu_{x})\big{(}y_{i}-\mu_{ y}\big{)}\right] \tag{12}\]As can be seen from the results in Table 4 that the bit rate of the compressed SVSV is affected by the video resolution and the navigation scene at the same QP value. The higher the resolution and the more complex the video content, the higher the bit rate of the video. The results of SSIM also reflect that when the QP value is 32, the compression effect of HEVC is relatively good, and the quality of the compressed video does not produce a more obvious difference in sensory experience compared with the original video. At the same time, under the premise of the same video content, the higher the resolution of the SVSV, the higher the compression ratio, which fully indicates that the larger CTU quadtree division structure of HEVC can well adapt to the more complex content areas in the high-resolution SVSV, and also has a good compression effect on flat areas. The comparison results in Figure 8 show that different QP values have different effects on the compression performance of different types of SVSVs. The larger the QP value the more distortion of content details, and the lower the QP value the clearer the video.