# A Low-Complexity Lossless Compression Method Based on a Code Table for Infrared Images
## 3 Redundancy Analysis of Line-Scan Panoramic Infrared Images  
From information theory, information can be measured by the self-information. Suppose the set of source symbols is \(S=\{s_{1},s_{2},\ldots s_{n}\}\). The probability of occurrence of each symbol is \(P=\{p(s_{1}),p(s_{2}),\ldots p(s_{n})\}\). The self-information \(I(s_{i})\) of \(s_{i}\) is defined by the equation  
\[I(s_{i})=\log_{2}1/p(s_{i})\quad\text{(bit)}, \tag{1}\]The smaller the probability of symbol \(s_{i}\), the more information it conveys. The information entropy \(H(S)\) is the mathematical expectation of the self-information \(I(s_{i})\). The information entropy \(H(S)\) indicates the minimum number of bits needed to represent each source symbol in a binary computer, which is defined as  
\[H(S)=-\sum_{i=1}^{n}p(s_{i})\cdot\log_{2}p(s_{i})\quad(\text{bit/symbol}), \tag{2}\]  
A two-dimensional (2D) image is a kind of information that humans can intuitively perceive. The continuous tonal distribution in nature leads to significant spatial redundancy in visible images, while the scene's infrared radiation continuity results in similar redundancy in infrared images. The image spatial redundancy is manifested as a large number of neighboring pixels with little or no change, resulting in a high correlation between the image pixels. Infrared images, due to their spatial redundancy, exhibit low actual information entropy, indicating high compression potential. However, obtaining the exact source entropy is challenging and can only be approximated closely by certain methods. In the field of digital imaging, image differencing represents the changes between adjacent pixels. The correlation between difference pixels is weak, effectively reducing spatial redundancy. Digital image differentiation involves both inter-column and inter-row differencing. Inter-column differencing is defined as  
\[dp(i,j)=p(i,j)-p(i,j-1), \tag{3}\]  
where \(p(i,j)\) is the current column pixel, \(p(i,j-1)\) is the previous column pixel, and \(dp(i,j)\) is the differential pixel \(j\geq 2\). The inter-row differencing can be derived analogously. Infrared line scanning imaging, as it is distinct from area array imaging, involves capturing panoramic images through a 360-degree rotating scan. In line-scan images, each row is acquired by the same photosensitive element, leading to stronger inter-column correlations compared to traditional images. We choose two 640 x 512 14-bit infrared images, which are a portion of a line-scan panoramic infrared image, and analyze the correlation of the original and differential images, named image A and image B. We calculate the inter-column correlation coefficients and count the probability of occurrence pixels. The experimental results are shown in Figure 1 and Table 1.  
The inter-column correlation coefficient is defined as  
\[r(j)=\frac{\sum_{i=1}^{512}\sigma(i,j)\cdot\sigma(i,j-1)}{\sqrt{\sum_{i=1}^{512 }\sigma(i,j)^{2}\cdot\sum_{i=1}^{512}\sigma(i,j-1)^{2}}}, \tag{4}\]  
\[\sigma(i,j)=p(i,j)-\overline{p(j)}, \tag{5}\]  
where \(\overline{p(j)}\) is the mean value of the \(j\)th column. The inter-row correlation coefficient can be derived analogously. The experimental results indicate that the correlation coefficients of the original image all exceed 0.99. Inter-column differencing significantly reduces the correlation of the image. The entropy of the original image A is 10.3854 bit/symbol, while the entropy of the inter-column differential image A, at 4.9182 bit/symbol, is lower than that of the inter-row differential image A, which is 6.3071 bit/symbol. Further analysis on images from 51 diverse scenarios consistently demonstrates that the entropy of inter-column differential images reaches a minimum. These findings are summarized in Table 2. The 51 images are 14-bit infrared images captured by a line-scan infrared detector in different scenarios. The image sizes vary and include 640 x 512, 1000 x 2000, 2000 x 4000, 1000 x 4000, and 2000 x 8000.