Images are a large part of all transmitted data. The purpose of the article is to explore the possibilities of using image processing methods and tools to reduce the information load on the channel and preserve the content component. Spatial and spatio-spectral representations of the image and methods of their processing are considered, these are the effectiveness of compression and the possibility of recovery using machine learning algorithms. As a result, it was determined that the combination of the described methods makes it possible to effectively apply image compression at the preprocessing stage without loss of informativeness. The paper summarizes the results of experiments, image parameters during processing and draws appropriate conclusions.

1. Introduction

Raster and vector format data play a major role in the modern world, and therefore it is necessary to solve problems related to their transmission over communication channels. The main task in this case is to reduce the amount of transmitted data. At the stage of preparing data for transmission, encoding algorithms can be used to ensure the reliability of transmission, and compression algorithms to reduce the amount of transmitted data

[1][2]

When transferring images, it is especially important to preserve the visual component, since the information content of the image depends on these characteristics. In this case, the amount of lost information depends on the location of the distorted or lost data

[1]

The purpose of the article is to explore the possibilities of using image processing methods and tools to reduce the information load on the channel and preserve the content component.

2. Image representation options

When processing images, various representations of them are often used, which allows you to use their certain properties. A separation like that can be performed, for example, in the color model: RGB, CMYK, HSB. The article considers image representation models that provide the process of transmitting them over a communication channel:

1) Spatial representation;

2) Spatio-spectral representation based on Walsh functions;

3) Spatio-spectral representation based on pseudorandom sequences.

Spatial representation implies a digital image, which is defined by a discrete array of numbers that make up the N×N (1) matrix G. For grayscale images, each pixel takes a value from 0 to 255.

`[LATEX_FORMULA]\text { mathitG }=\left(\begin{array}{ccc} g_{1,1} & \cdots & g_{1, N} \\ \vdots & \ddots & \vdots \\ g_{N, 1} & \cdots & g_{N, N} \end{array}\right),[/LATEX_FORMULA]`

where g_{i,j} – a single pixel of a digital image, (i,j) – the indices of the pixel position in the image matrix, [LATEX_FORMULA]i=\overline{1, N} ; \mathrm{j}=\overline{1, N}[/LATEX_FORMULA].

When translating an image into a spatio-spectral form, the relationship between the values of the image elements is manifested

[3]

The image is a two-dimensional discrete function; therefore, it is possible to use orthogonal unitary transformations. Due to a direct unitary transformation of the matrix of the original image, it is possible to obtain a spatio-spectral representation of an image of the same size, the elements of which are calculated using the formula (2)

[4]

`[LATEX_FORMULA]F(u, v)=\sum_{i=0}^{M-1} \sum_{j=0}^{N-1} g(i, j) \varphi_{(u, v)}(i, j)[/LATEX_FORMULA]`

where [LATEX_FORMULA]\varphi_{(u, v)}(i, j)[/LATEX_FORMULA] – a set of orthonormal functions (the kernel of the direct transformation), u, v

The original image can be obtained using the inverse transformation (3).

`[LATEX_FORMULA]g(i, j)=\sum_{u=0}^{M-1} \sum_{v=0}^{N-1} F(u, v) \varphi_{(i, j)}^{-1}(u, v)[/LATEX_FORMULA]`

where [LATEX_FORMULA]\varphi_{(i, j)}^{-1}(u, v)[/LATEX_FORMULA]

The Fourier transform and the Walsh transform are often used for the transition to the spatio-spectral domain. The Fourier transform is a common method of analyzing periodic functions and signals, which allows you to represent a function as a sum of sines and cosines. Unlike trigonometric functions, Walsh functions take only two values: +1 and -1.

In this paper, the Walsh functions are used as a non-trigonometric orthogonal basis of the function. The Walsh transform has faster execution compared to the Fourier transform, which makes it more efficient for real-time signal processing, and it is also more resistant to noise and signal distortion

[5]

The direct transformation in matrix form is described by the expression (4).

`[LATEX_FORMULA]\text { mathitF }=\text { mathitmathit } \mathrm{H}_{\text {mathitw }} \text { mathit } * \text { mathitGmathit } * \text { mathit } \mathrm{H}_{\text {math itw }},[/LATEX_FORMULA]`

where [LATEX_FORMULA]\text { mathitG } [/LATEX_FORMULA] – image matrix, [LATEX_FORMULA]\text { mathit } \mathrm{H}_{\text {mathitw }} [/LATEX_FORMULA]– Hadamard matrix, ordered by Walsh, [LATEX_FORMULA]\text { mathitF }[/LATEX_FORMULA]

The inverse transformation takes the form:

`[LATEX_FORMULA]\text { mathitG }=\frac{1}{N^2} \text { mathitH }_{\text {mathitw }} \text { mathitFmathit } H_{\text {mathitw }}[/LATEX_FORMULA]`

where [LATEX_FORMULA]\text { mathitG }[/LATEX_FORMULA] – image matrix, [LATEX_FORMULA]\text { mathitH }_{\text {mathitw }} [/LATEX_FORMULA]– Hadamard matrix, ordered by Walsh, [LATEX_FORMULA]\text { mathitF }[/LATEX_FORMULA]

The complexity of calculating the spectrum can be reduced if orthogonal functions are applied only to rows or columns of the image, in that case the direct transformation to the spatio-spectral transformation looks like

[3]

`[LATEX_FORMULA]\text { mathitF }=\text { mathitH }_{\text {mathitw }} \text { mathitG }, [/LATEX_FORMULA]`

where [LATEX_FORMULA]\text { mathitG }[/LATEX_FORMULA] – image matrix, [LATEX_FORMULA]\text { mathitH }_{\text {mathitw }}[/LATEX_FORMULA] – Hadamard matrix, ordered by Walsh, [LATEX_FORMULA]\text { mathitF }[/LATEX_FORMULA]

Since the matrix [LATEX_FORMULA]\text { mathitH }_{\text {mathitw }}[/LATEX_FORMULA] is orthogonal and symmetric, the inverse transformation is written as:

`[LATEX_FORMULA]\text { mathitG }=\frac{1}{\text { mathitN }} \text { mathitH }_{\text {mathitw }} \text { mathitF }, [/LATEX_FORMULA]`

where [LATEX_FORMULA]\text { mathitG }[/LATEX_FORMULA] – image matrix, [LATEX_FORMULA]\text { mathitH }_{\text {mathitw }}[/LATEX_FORMULA] – Hadamard matrix, ordered by Walsh, [LATEX_FORMULA]\text { mathitF }[/LATEX_FORMULA]

One of the disadvantages of using the Walsh function basis is a significant unevenness of the energy distribution over the spectral components.

Let us consider a spatio-spectral representation based on pseudorandom sequences (hereinafter referred to as SSR).

Noise similarity (randomness of state change) in such sequences guarantees the absence of sudden power drops in the conversion interval and the absence of overloads in the channel.

SSRs are generated by a shift register with linear feedback

[6]

`[LATEX_FORMULA]\text { M(x) } = \Sigma^N_{\text {i=1}} a_{\text {i}} x^i[/LATEX_FORMULA]`

where [LATEX_FORMULA]\text { a }_{\text {N }}, \text { a }_{\text {1 }} = 1[/LATEX_FORMULA]; [LATEX_FORMULA]\text { a }_{\text {i}} \in \text [0,1][/LATEX_FORMULA]; N - the number of digits of the shift register.

It is necessary to make sure that the polynomial sets the initial state [LATEX_FORMULA]\text {a}_{\text {1}} = 1[/LATEX_FORMULA]

Any generating polynomial can be matched with a Fibonacci generator (9).

`[LATEX_FORMULA]\left\{\begin{array}{c} g_1(k+1)=\sum_{i=1}^N a_i g_i(k), \\ g_i(k+1)=g_{j-1}(t), j=2, N, \end{array}\right.[/LATEX_FORMULA]`

where [LATEX_FORMULA]\text {g}_{\text {i}}(t)[/LATEX_FORMULA] – the state of the i-th digits of the shift register on the clock [LATEX_FORMULA]\text k, i=\overline{1, N}, k=1,2^N-1 .[/LATEX_FORMULA]

The algorithm for forming a sequence in matrix form is described by the expression (10).

`[LATEX_FORMULA]\text { mathitG }(k+1)=\text { mathitmathit }\Psi\text { mathit } * \text { mathitG }(k),[/LATEX_FORMULA]`

where [LATEX_FORMULA]\text { mathit } \Psi=\left[\begin{array}{ccccc} a_1 & a_2 & \ldots & a_{N-1} & a_N \\ 1 & 0 & \ldots & 0 & 0 \\ 0 & 1 & \ldots & 0 & 0 \\ \ldots & \ldots & \ldots & \ldots & \ldots \\ 0 & 0 & \ldots & 1 & 0 \end{array}\right] .[/LATEX_FORMULA]

The considered SSRs have certain properties [7] and are called maximum period sequences or M-sequences. The number of different polynomials generating an M-sequence depends on its period [LATEX_FORMULA]\text {M} = {2^n} - 1.[/LATEX_FORMULA]

To build a noise-like transformation in order to further transmit images over communication channels, it is necessary to form a transformation matrix by cyclically shifting the original SSR. The number of rows of the matrix is equal to the period, the size of the matrix, respectively, [LATEX_FORMULA]M \times M.[/LATEX_FORMULA]

The constructed matrix must meet the requirements of orthogonality, it is necessary to align the number of single and zero characters on the period of the SSR and switch to the alphabet {-1, 1} in the rows and columns of the matrix. For a matrix formed in this way, a pair of transformations (11) can be written in the following way:

`[LATEX_FORMULA]\left\{\begin{array}{c} \text {mathitF}\mathrm{}_{\text {mathitc }}^{\text {mathitn }}=\text {mathitM}\mathrm{}_0^{\text {mathitn}} \text {mathitB}\mathrm{}_{\text {mathitn }}^{\text {mathitc }} \\ \text {mathitB} _{\text {mathitc }}^{\text {mathitn }}=\text {mathitF} \mathrm{}_{\text {mathitc }}^{\text {mathitn }} \text {mathit} M_0^{\text {mathitnmathitT}} \end{array}\right.[/LATEX_FORMULA]`

- matrix (matrix-string) of signal conversion coefficients; [LATEX_FORMULA]\text {mathitB} _{\text {mathitc }}^{\text {mathitn }} [/LATEX_FORMULA]- the matrix (column matrix) of the signal; [LATEX_FORMULA]\text {mathit} M_0^{\text {mathitnmathitT}} [/LATEX_FORMULA]

Figure 1 shows the result of applying the transition to a spatio-spectral representation based on Walsh and SSR functions for transmitting satellite images over a communication channel.

Using an orthogonal transformation based on a pseudorandom sequence for a satellite image

3. The process of image transmission

When describing the transmission process, it is customary to highlight steps before transmission (preprocessing) and after transmission (postprocessing)

[8][9]

The image transfer process is shown in Figure 2. As input, the model takes an image and transforms it either on the basis of Walsh functions or pseudorandom sequences. Matrices in the spatio-spectral representation are compressed. After the transfer, operations are performed to obtain the original image. The losses that occur during compression, transmission, and performing transformations to the spatio-spectral representation are corrected by machine learning methods.

The process of image transmission

4. Image compression

Compression methods can be used for the convenience of storing and transferring images. In general, they are divided into 2 categories: lossless compression and lossy compression. The first of them assumes the presence of an inverse algorithm that allows getting the original image in its original form.

The simplest and most common example when working with images is the RLE algorithm. Its essence is to replace a sequence of identical values with a pair, where the number of repetitions of the element is indicated first, and then the value itself

[10]

Since the RLE algorithm is a lossless compression algorithm, and the transition to a spatio-spectral representation implies rounding operations, which means some information is lost during calculations, it is possible to add to the transformation the clipping of some values below the threshold

[11]

The study of compression with truncation of threshold values was carried out in the Matlab environment

[12]

After applying the compression algorithm with truncation of values not exceeding the threshold, the restored image will have certain deviations from the original one. Figure 4 shows an image after compression with a truncation threshold of 5 for a spatial spectral representation based on Walsh functions. The performed truncation allowed us to increase the percentage of compression, and due to the conversion to a spatio-spectral representation, the image details were not distorted, and the visual component did not reduce the information content of the data. The increase in standard deviation (SD) is determined by a change in the spectral component and is visually expressed in a change in the tonality of the image: in the original image, most brightness values are in the range from 120 to 130, and the restored image is from 130 to 150.

Images using compression of the spatial spectral representation based on Walsh functions

Experiments with thresholds 3 and 7 were also performed for the spatio-spectral representation based on Walsh functions. In the first case, the SD is 5.78, and the compression ratio is 38%. In the second case, the SD is 15.73, and the compression ratio is 61%. With an increase in the threshold value, the compression ratio increases less compared to an increase in SD, therefore it is advisable to use a threshold of 5, distortions at which are expressed by shifting brightness values to lighter ones, and compression reduces the amount of data by almost 2 times.

An experiment for compression with a cut-off threshold of 20 for a spatio-spectral representation based on the SSR is shown in Figure 5.

Images using compression of the spatio-spectral representation based on the SSR

Experiments with thresholds of 10 and 30 were also carried out. In the first case, the SD is 3.2248, and the compression ratio is 29.2892%. In the second case, the SD is 13.09999, and the compression ratio is 68.1915%.

For the convenience of comparing the results of experiments on image restoration after compression with threshold truncation, it is advisable to choose a truncation threshold for each type of transformation, where the compression ratio is approximately the same. For Walsh functions, the threshold is 5, and for SSR – 20.

5. Image recovery

The problem of smoothing some areas in the image that arises when using compression algorithms with truncation can be solved by an approach to image restoration based on the use of machine learning algorithms. The models being developed usually use repeating sections of different scales within a single image, or study comparisons between pairs of low- and high-resolution image fragments in external databases. Since these models are trained by minimizing the SD, the results are usually blurred, and do not contain high-frequency textures due to the above regression to the mean value.

The reason for this result is related to the choice of the objective function, which is used by modern methods. Most systems minimize the pixel-by-pixel mean square error (MSE) between the original and the restored image

[13]

To solve this problem, models of convolutional neural networks have been proposed, which based on the feature map allow recognizing and working with objects in the image, it leads to clearer results despite the low values of the peak signal-to-noise ratio (PSNR).

Among the algorithms that use convolutional neural networks to restore images, the pixelNN and EnhanceNet-PAT projects are noted. PixelNN tries to recreate the lost image details using a neural network pre-trained on a large collection of images, synthesizing the missing elements based on matching optimal matches with previously processed images

[15]

The EnhanceNet-PAT algorithm specializes in performing operations to increase the resolution of images and improve the quality of photos, for example, allowing you to improve the quality of images from web cameras

[16]

The method is based on the nearest neighbor (NN) approach, which reconstructs a high-resolution photo. At the first stage, a convolutional neural network is used to map the input data to an overly smoothed image, and at the second stage, the nearest neighbor pixel method is used to map the smoothed output data to several high-quality high-frequency outputs in a controlled manner.

One of the proposed algorithms, Deep Image Prior, uses two of the most popular image recovery methods, these are machine learning algorithms and methods based on probabilistic repetition of the contents of neighboring areas

[14]

After transmitting an image that has been subjected to lossy compression, it is possible to use machine learning to improve the quality of the received data. For images restored to a spatial representation, the best result is shown by using the Deep Image Prior algorithm. This network is suitable to perform standard image processing tasks such as noise reduction, rendering, and improvement of detail and resolution.

The described algorithm is a parametric function x = f(z), which maps the code vector z to the image x. The network has a standard structure, the architecture is presented in the form of a U-Net-like\hourglass with several million parameters.

Figure 6 shows the results of quality improvement for images subjected to compression in the spatio-spectral representation based on Walsh and SSR functions. The use of machine learning methods allows you to improve the result of the received image, using compression with clipping by a threshold value.

Improved image by machine learning methods

6. Conclusion

The experimental part was conducted in the Matlab development environment

[12]

For the experimental part, an array of different images containing different types of landscape was compiled. This type of image is interesting because despite the presence of a large number of details (for example, a forest area where each tree can be considered as a separate object), the brightness distribution on them ranges from 50 to 150 in shades of gray.

As a metric of the efficiency of using truncation during compression, the number of bits per pixel was calculated (12). This expression takes into account the decrease in the array of initial values of the matrix and determines the allocation of memory for each element.

`[LATEX_FORMULA]\text { count }=\frac{\mathrm{N} * \mathrm{N} * 8-\mathrm{K} * 8}{\mathrm{ N } * \mathrm{ N }},[/LATEX_FORMULA]`

where N – the length and width of the image, K – the number of identical values in the image, 8 – the constant value of the number of bits allocated per value.

The metric is presented only for the spatial-spectral representation, since truncation of values in the spatial representation does not give effective results during reconstruction.

For a spatial spectral representation based on Walsh functions, we present the calculation of the number of bits per pixel before and after truncation. Initially, 8 bits are allocated for each element. After truncation by the threshold value for the spatial spectral representation based on Walsh functions, we get a value of 3.9 bits per pixel, which is about 2 times lower than before truncation. At the same time, being in the frequency domain avoids the appearance of anomalies that reduce the information content of the image.

After truncation by the threshold value for the spatio-spectral representation based on the SSR, we get a value of 3.87 bits per pixel, which is also about 2 times lower than before truncation.

In the course of the conducted research, it was revealed that the constructed model of the image transmission process allows reducing the information load on the channel through the use of preprocessing methods. At the same time, using a lossless compression algorithm preserves the values of the original matrix.

Truncating the threshold values does not reduce the amount of information obtained during visual image analysis.

Machine learning methods allow correcting anomalies that may occur when restoring an image to a spatial representation.

Further development of research is aimed at exploring the possibilities of lossy compression algorithms, as well as improving the performance of machine learning algorithms that take into account statistical relationships in spatial-spectral representation, in the tasks of increasing the detail and resolution of images after their transmission with distortions.

The additional file for this article can be found as follows:

Further description of analytic pipeline and patient demographic information. DOI:

None

None