Analysis of image compression methods based on wavelet transforms for maritime applications

The purpose of the article is to develop recommendations for choosing image compression method based on wavelet transformation, depending on image type, quality and compression requirements. Among the wavelet image compression methods, Embedded Zerotree Wavelet coder (EZW) and Set Partition In Hierarchical Trees (SPIHT) are considered, and the Haar wavelet and wavelet transformation in the oriented basis with the first, third, fifth and seventh decomposition levels is used as the base wavelet transform. These compression methods were compared with each other and with the standard JPEG method on the following parameters: mean square error, maximum error, peak to noise ratio, number of bits per pixel, compression ratio, and image size. The proposed methods can be successfully applied in the transmission of seabed relief images obtained from satellites or sea buoys.


Introduction
Currently, wavelet analysis is widely used in marine research -when solving problems of diagnosing underwater inhomogeneities or determining the topography of the seabed, because inappropriate or inaccurate detection of heterogeneity can lead to irreversible catastrophic consequences. [9] In the analysis of the seabed relief and the study of nonstationary features of the ocean waves from the equipment of floating platforms at sea or with the help of satellites, the problem of compression of images for the next transmission becomes a topical issue. [7], [10] In particular, in the last case, when it is necessary to transmit large quantities of images and volumes, the prior stage of compression is important, which reduces the transmission time and reduces the amount of data to be transmitted. In data storage systems it is important to reduce the amount of data.
The development of information and communication technologies, computer and computer technology leads to the emergence of new, more complex methods, among which the discrete wavelet transforms occupy an important place. There are methods of compression on the basis of wavelet transformations without losses and losses. The first case is characterized by small degrees of compression (from 3 to 5 times). In the second case, when compression with losses, the degree of compression can reach hundreds of times. For example, the degree of video compression in the video codecs of the family ADV6xx varies from 3 to 350 and more times [3].
The standard JPEG method, unlike the wavelet-based methods, involves compressing each 8x8 pixel image separately. As a result, with high compression levels on the restored image, a block structure can be seen. With wavelet compression, this problem does not arise, but there may be other types of noise that look like rocks near sharp boundaries. It is believed that such artifacts are, on average, less thrown in the eyes of the observer than the "squares" created by JPEG [1].
The basic wavelet transform used for the initial image, we select a two-dimensional discrete wavelet Haar with different levels of decomposition. The resulting Haar wavelet coefficient set is subsequently compressed by the Embedded Zerotree Wavelet coder (EZW) [4] algorithm and the Set Partition In Hierarchical Trees (SPIHT) algorithm [1]. Both compression algorithms are then compared to the standard JPEG method.
The promising way of developing image compression methods based on discrete wavelets is to use other wavelet bases. In particular, it is advisable to develop a compression method based on a discrete spectral transform at oriented basis (OB-transform) [11], [12]. The use of the basic functions of this transform as a wavelet basis gives the opportunity to obtain more information about the features of the investigated image due to the use of a large number of wavelet decomposition filters.
To find a compromise between image quality and compression, it is necessary to conduct research and comparative analysis of various methods that will allow the development of recommendations for the application of a method for images of different nature and taking into account the requirements of the analysis problem.
To evaluate the quality of a compressed image, we will consider the mean square error, the maximum error, and the ratio of peak signal to noise. To estimate the compression ratio, we will consider the number of bits per pixel, compression ratio, and image size.

Algorithms EZW and SPIHT
The general image compression scheme ( Fig. 1) contains a preliminary processing step for the initial image, a two-dimensional discrete Haar wavelet transform, and a compression based on the EZW or SPIHT algorithms.
The EZW algorithm [4] is based on the formation of zero-tree wavelet coefficients, whose root is a strongly smoothed version of the original, and the branches represent separate blocks that end at that level, where further processing does not make sense, which is determined by the given quantization threshold. At the same time, the values of the coefficients below the threshold are zeroed. The role of zero-tree is to prevent the transmission of these zeros. If necessary, the threshold value may decrease, which will result in more non-zero coefficients in the compressed image.
The SPIHT algorithm is an upgraded version of the EZW algorithm [1]. It operates with hierarchical code and allows to transmit image with its gradual refinement, and initially formed an approximated version of the initial image, which takes a relatively small amount, and then additional refinement data, the amount of which is set according to the established requirements.

Algorithm JPEG
The algorithm was developed by a group of experts in the field of photography (JPEG -Joint Photographic Expert Group) within the ISO -International Organization for Standardization [5]. In this algorithm (Fig. 2), a two-dimensional discrete cosine-transform (DSC) is used, which applies to each block of 8x8 pixels of the initial image. Source: [13] After transforming the color model of an RGB image into YUV, the digitization of values and partitioning on the 8x8 matrix is followed by the use of a DSC. The result is a matrix in which the coefficients in the upper left corner correspond to the low-frequency component of the image, and in the lower right-hand side it is high-frequency. Next, the quantization procedure and the transfer of the 8x8 matrix to the 64-element vector using zigzag scan (ZigZag) are performed. At the beginning of the vector there are coefficients of the matrix, corresponding to low frequencies, and in the end -high. The next step is RLE (Run-Length Encoding) [6], after which the pair values obtained are encoded by the Huffman method [8].
Scope of JPEG -data compression and multigraphic images (photos, television screensavers, graphics) with a pixel depth of 6 to 24 bits with satisfactory speed and efficiency. JPEG provides a high degree of compression taking into account the features of human vision (the eye better recognizes intensity changes than color changes). This saves more information about the half-tone content of the image, and compression is made more by the loss of information about color filling.

Comparative analysis of compression methods
In the study, images were considered, to which the considered methods were used. In the methods of compression based on Haar wavelets, the levels of decomposition up to the seventh inclusive were considered. To compare the selected compression methods, the following parameters were used: MSE (Mean Square Error) -The mean square error that is calculated by the formula: (1) where m, n is the horizontal and vertical image, X (i, j), Xc (i, j) is the value of the two-dimensional functions of the initial and compressed images.
Max.Error -maximum compression error value: PSNR (Peak Signal to Noise Ratio) -Signal / noise peak value in dB: The higher the PNSR, the better the quality of the compressed image [3].
BPP (Bit Per Pixel) -A ratio that indicates the number of bits needed to save one pixel image: Comp.Ratio -compression ratio, which specifies the proportion of compressed image from the original in %: Image weight, kbytes -amount of memory required to store a compressed image. After applying the compression methods we obtained the results summarized in Table 1 and Table 2. According to Table 1, the combined dependency charts of the three main parameters (MSE, Max.Error, Comp. Ratio) are constructed from the level of the decomposition of the Haar wavelet transform (Fig. 4). On the graphs, the horizontal lines show the limits of the permissible values of the parameters, which correspond to the maintenance of acceptable quality in visual observation.
The mean square (EZW MSE curves and SPIHT MSE curves) and maximum errors (EZW Max Error curves and SPIHT Max. Error curves) (see Graph 1) increase with increasing Haar decomposition. This is due to the fact that wavelet-coefficients of large amplitude, which contain useful signal information, are concentrated in the lowfrequency region. At compression coefficients, the amplitude of which is close to zero, are discarded, but with an increase in the level of decomposition, there is a greater sweep of the useful signal together with small wavelet coefficients, therefore quality indicators deteriorate.
Comparing methods for quality parameters, we see that the EZW method has the lowest errors. From Table 1. It is evident that EZW also has the best peak / noise ratio.
Comparative analysis of compression parameters showed that the SPIHT method has the best compression rates Comp.Ratio, %, (curves EZW Coefficient and SPIHT Coefficient). To store one pixel of the original image, this method required the least bit of EZW and JPEG, so the total weight of the compressed image is the lowest. For level 3 decomposition, the coefficient BPP = 1.3918, and the weight -160kb ( Table 1).
The JPEG method occupies an intermediate position between EZW and SPIHT: in the first layers of decomposition, the quality of the compressed image by JPEG inferior to another image compressed with EZW and SPIHT By increasing the decomposition level in EZW and SPIHT, it receives better compression compared to JPEG, but the worst quality.
So, if it is necessary to get a compressed high quality image, EZW method should be chosen. If the compression ratio is more important then SPIHT or JPEG are more preferable.
In Graph 1, the horizontal lines indicate the limit of the values of acceptable quality parameters, which makes  it possible to obtain a receptive at the level of decomposition. The boundary was determined when considering compressed images visually, taking into account the sharpness and the number of points that appeared on the compressed image. In our example, the level of decomposition is defined as 5 (see Graph 1). Decomposition above the fifth level sharply impairs the image quality, so it is inappropriate. However, at a lower level, compression rates deteriorate.
Analysis of the application of the considered compression methods for the indicated images and other approximately the same volume (color and black and white photos, graphic images) gave similar results, confirming the validity of the formulated conclusions and recommendations for application.

Image analysis using a wavelet transform in an orientated basis
Let's consider use of discrete spectral transform at oriented basis (OB-transform) [11], [12] for construction of wavelet basis that could be used for image compression. This method operates with the interval of initial function N=m n where m is simple number, and n is integer. The most attractive case is observed when m=3 because the matrices of direct and reverse basic functions contain only integer and zero numbers [11]. Thus, the specific feature of wavelet transform at oriented basis is the use of three different filters. Wavelet multiscale decomposition of the original function is performed by three types of coefficients (see Table 3). The calculation of the wavelet coefficients is an iterative procedure in which the analysis of the function is performed at different levels of decomposition with a gradual extension of the viewing interval from the minimum, which includes three readings, to the maximum, equal to the interval of definition of the function. In the case of an image, we use a direct conversion step to each matrix line.
After the simulation, results were obtained at the first, second, third, and fourth levels of the wavelet decomposition at oriented basis (Table 4) for image Fig. 3b.
The quality of the compressed image was evaluated using the same parameters as for Haar wavelet. It was found that MSE (mean square filtration error), which at all levels of decomposition was greater for Haar wavelet transform, PNSR (the ratio of useful signal to noise), which was higher for OB wavelet, indicating a lower level of distortion after compression. The Comp.Ratio parameter evaluating the compression level for the OB was slightly larger than for the Haar wavelet. It is also worth noting that the image weight when using OB for compression was slightly larger compared to the Haar wavelet.
Comparing the data of Table 2 and Table 4, we can see that when using the wavelet transform at oriented basis, the EZW and SPIHT compression methods provide better compression quality in parallel with the use of Haar wavelet at all investigated levels of decomposition. In this case, the OB wavelet is a bit inferior to the Haar wavelet in the compressed image weight.

Conclusions
Studies and comparative analysis of image compression methods based on discrete Haar wavelet and JPEG algorithm allowed to formulate recommendations for selecting the method and level of wavelet decomposition, depending on the desired quality and conditions of the task.
According to the results we can say that: • Decomposition above the fifth level sharply impairs the quality of the image, so it is inappropriate.
• EZW provides better compressed image quality (PNSR: 52.9dB -22.77 dB; BPP: 8.2323 -0.11765), depending on the compression ratio (98.90% -1.47%), which is determined by the wavelet decomposition level. So, it's best to use for images with lots of small details such as photo or digital pictures.    • JPEG compared to EZW and SPIHT at 1 and 3 decomposition levels provides better compression (14.104%) but poorer picture quality (PNSR: 31.50 dB; BPP: 1.7017), so this method is suitable for simple tasks, such as static photo and graphic images.
• When using wavelet transform at oriented basis, the EZW and SPIHT compression methods give the best compression quality in parallel with the use of the Haar transform wavelet at all investigated levels of decomposition. In this case, the OB transform is a bit inferior to the Haar wavelet in the compressed image weight. MSE (mean square error filtering), which at all levels of decomposition was greater for the Haar wavelet transform, the PNSR parameter (the ratio of the useful signal to noise) was higher for the OB, indicating a lower level of distortion after compression.

Funding:
The research presented in the manuscript was funded by Ministry of Education and Science of Ukraine, research project "Heterogeneous network of information collecting, transfering and processing for distributed generation system MicroGrid", state registration number 0119U001184.
Author Contributions: Research, Iuliia Yamnenko -conceptualization of data processing and image compression on the base of wavelets. Research, Tetyana Теreschenko -methodology of wavelet transform application for image compression. Data analysis, verification -Oleksandr Melnychenko. Defining the decomposition level for image compression -Maryna Panchenko. Comparative analysis of different types of wavelets, writing, editing -Liudmyla Laikova.