APPLICATION OF TWO-DIMENSIONAL PADÉ-TYPE APPROXIMATIONS FOR IMAGE PROCESSING

Context. The Gibbs phenomenon introduces significant distortions for most popular 2D graphics standards because they use a finite sum of harmonics when image processing by expansion of the signal into a two-dimensional Fourier series is used in order to reduce the size of the graphical file. Thus, the reduction of this phenomenon is a very important problem. Objective. The aim of the current work is the application of two-dimensional Padé-type approximations with the aim of elimination of the Gibbs phenomenon in image processing and reduction of the size of the resulting image file. Method. We use the two-dimensional Padé-type approximants method which we have developed earlier to reduce the Gibbs phenomenon for the harmonic two-dimensional Fourier series. A definition of a Padé-type functional is proposed. For this purpose, we use the generalized two-dimensional Padé approximation proposed by Chisholm when the range of the frequency values on the integer grid is selected according to the Vavilov method. The proposed scheme makes it possible to determine a set of series coefficients necessary and sufficient for construction of a Padé-type approximation with a given structure of the numerator and denominator. We consider some examples of Padé approximants application to simple discontinuous template functions for both formulaic and discrete representation. Results. The study gives us an opportunity to make some conclusions about practical usage of the Padé-type approximation and about its advantages. They demonstrate effective elimination of distortions inherent to Gibbs phenomena for the Padé-type approxi-mant. It is well seen that Padé-type approximant is significantly more visually appropriate than Fourier one. Application of the Padé-type approximation also leads to sufficient decrease of approximants’ parameter number without the loss of precision. Conclusions. The applicability of the technique and the possibility of its application to improve the accuracy of calculations are demonstrated. The study gives us an opportunity to make conclusions about the advantages of the Padé-type approximation practical usage.


ABBREVIATIONS
DCT is a discrete cosine transform; 2D DCT is a two-dimensional discrete cosine transform; is a metric Hilbert space with a square measure; i a are minimal levels of variables; i b are maximum levels of variables; x i are complex variables on the interval   x for numerator and denominator of P ; S is a two-dimensional power series; GS is a generalized power series; GS GP is a Padé-type functional; N is a number of harmonics for the Fourier series in 1 x direction, and the maximum power of x i in both numerator and denominator of P in the Chisholm approximation; M is a number of harmonics for the Fourier series in 2 x direction; i  are frequencies of 2D Fourier series; F n is a number of parameters in the Fourier series; P n is a number of parameters in the Padé-type approximation; F is a 2D DCT for f; is the Chisholm approximation of N-th order; p is a matrix of the Chisholm approximation numerator coefficients; kp p are elements of p;

INTRODUCTION
Image processing by expansion of the signal into a two-dimensional Fourier series in order to reduce the size of the graphical file often leads to significant image distortion, in particular, due to the Gibbs effect.The Gibbs phenomenon is the property of the one-dimensional Fourier series which manifests in the decomposition of a discontinuous periodic function when they are truncated and a finite number of members are used [1][2][3].In the case of truncation a distortion occurs near the discontinuity points which cannot be eliminated by increasing the finite number of terms of the series.In two-dimensional case the Gibbs phenomenon significantly reduces the quality of the processed images for most popular graphic standards because they use a finite sum of harmonics.Distortion occurs on the borders of sharp contrast change and leads to the appearance of false optical shadows.It negatively influences the analysis quality when processing the results of x-ray and sonar studies.
The object of study is the image processing.
The subject of study is the generalized sum of a twodimensional Fourier series obtained by image processing using the fractional rational approximants.
The purpose of the work is the application of the two-dimensional Padé-type approximations for the purpose of elimination of the Gibbs phenomenon for image processing and the reduction of the size of the resulting image file.

PROBLEM STATEMENT
Let the original monochrome image be given in the form of a two-dimensional function of tone f or a set of its . The aim is to find an appropriate two-dimensional Padé-type approximation , / , , P m n m n x x to eliminate the Gibbs phenomenon for image processing and reduce the size of an image file.

REVIEW OF THE LITERATURE
The Gibbs phenomenon also exists in the twodimensional case, and it significantly reduces the quality of images processing for most popular graphic standards because they use a finite sum of harmonics [2].Distortion occurs on the borders of sharp contrast change and leads to the appearance of false optical shadows [3,4].It is detrimental for the analysis quality when processing the results of the x-ray and sonar studies.Gibbs phenomenon is a type of MRI artifact, which leads to a series of lines in the MRI image parallel to abrupt and intense changes in the object, such as the CSF-spinal cord and the skull-brain interface [4,5].
The theory of approximation of mathematical physics functions is the most rapidly developing field of mathematics [1,6,7].Traditionally, only the approximation techniques which use polynomials [1,8,9] and trigonometric functions [6,7,10] are considered.The most successful type of such approximation techniques is the approximation by fractional rational functions [11,12].The interest in the theory of fractional-rational approximations has been steadily increasing due to their wide application in various studies in the field of theoretical physics, applied mechanics, geophysics, etc. [8,11,12] due to them allowing for a generalized summation of series and the extension of the function to be approximated into the meromorphic domain.
Recently, great attention has been given to the expansion of the classical theory of approximation by fractional-rational functions to various types of basis functions and different methods of constructing approximants -to Padé-type approximations [12][13][14][15][16][17][18][19].A special choice of the constructing method for the approximation makes it possible in many cases to achieve a significant improvement in the useful properties of the approximants for certain distinct classes of functions [12][13][14].
We suggest the application of the two-dimensional Padé-type approximants method which we have developed earlier [12] for the purpose of reduction of the Gibbs phenomenon in the harmonic two-dimensional Fourier series.

MATERIALS AND METHODS
Let's provide some basic principles of construction of the Padé-type approximants for the harmonic twodimensional Fourier series as a subset of power series.According to our approach [12], we consider the separable space , f x x , which are integrable on this rectangle.The boundaries of the rectangle can be finite or infinite.We can choose a countable set of functions   as a basis of space with respect to individual coordinates of the form The basic functions in the case of trigonometric functions can be represented in the form The expansion of an arbitrary function in the space under consideration with respect to the basis (2) can be regarded as a two-dimensional generalized power series of the form In [12] we have proposed the definition of the functional of the Padé-type in following form.
Definition.Suppose a two-dimensional power series , / , , P m n m n x x in the proper sense are given.The Padé-type functional , / , , GS GP m n m n f f associated with the given generalized power series for the complex functions of these variables is defined as The following sequence details the construction process: 1.The types of bases for the individual variables 2 1 B ,B and the basis of the space B (1) are chosen.
2. The function f to be approximated is represented in the form (3).
3. For the power series of two complex variables x 1 and x 2 with coefficients coinciding with (3), a Padé ap- , / , , P m n m n x x is constructed in the proper sense.
4. A substitution of basis functions into a functional of Padé-type ( 4) is performed.
The proposed scheme makes it possible to determine the set of coefficients of a series that is necessary and sufficient for the construction of the Padé-type approximant with a given structure of the numerator and denominator.
If we have a function which represents brightness of monochrome image point in the range of , / , , P m n m n x x , then to obtain cosine part of two-dimensional exponent, we use the following equality: As was considered in [18], in this case If the image is stored as a two-dimensional array of points (for example, as a bmp file), discrete Fourier transform procedures can be used to implement Padé approximation [2].DFT is the basis of many image and video compression algorithms, especially the basic jpeg and mpeg standards for compressing both still and video images.
The input image is decomposed into spectral components using a two-dimensional discrete cosine transform (2D DCT).2D DCT can be calculated by applying a onedimensional DCT algorithm for each row or column of a two-dimensional matrix of the input signal, since DCT is a separable function.The direct two-dimensional DCT of a M×N matrix of a two-dimensional signal f(x,y) can be written as where , f x x can be obtained as the values of F(u,v) (6), divided by the step.
Next, the range of the frequency values on the integer grid is selected according to the Vavilov method [13].The size of this range directly determines the number of equations that must be generated.
For this purpose, we use the generalized twodimensional Padé approximation for case N=M proposed by Chisholm [11].If f(x,y) is a function of two variables with a two-dimensional expansion into a power series of the form   p  The solution of this system of equations are matrixes of coefficients p and q.
The algorithm for compression of two-dimensional signals using two-dimensional discrete cosine transformation is shown in Fig. 1.

EXPERIMENTS
Here we consider some examples of Padé approximants application to simple discontinuous template functions for both formulaic and discrete representation.In general case images could be also represented using such series [2].
Let's consider a periodic template function with the period of 2 in the form 1, , , 0, .
This function is symmetrical about both 1 x and 2 x axes.Thus, the most suitable way of its approximation is a truncated Fourier series in the form We have applied Padé-type approximation to (6) with structure   2, 2 / 2, 2 , using subset of previously estimated Fourier coefficients (6) and no additional information.To obtain the cosine part of the two-dimensional exponent, we use the converse transformation ( 5) for Padé-type approximant    2, 2 / 2, , 2 P x x to obtain the desired real approximation.Transformation which is used for cosine series is the same as the one used in radio physics [10].
We also consider the six monochrome symmetrical bitmap test images from the digital library [20].These were also used as input data and can be seen in Table 1.In the case of an asymmetric input signal, the image can be artificially expanded to a symmetrical one.When using the jpeg standard, insignificant decomposition coefficients are excluded in order to reduce the file size.This procedure was used by processing the results of 2D DCP of the input image, considering the rapid decline of harmonic amplitudes, and it was this image that was used for comparison with the quality of the one compressed by the proposed method.Standardized root mean square error and normalized mean absolute error were used as comparison criteria.

RESULTS
Two-dimensional grayscale images used the template periodic function (7).The resulting truncated Fourier series (8) and it's Padé-type approximant are represented on Fig. 2a, 2b and 2c respectively.For the Fourier series the image demonstrates distortions inherent to Gibbs phenomena, and their effective absence for the Padé-type approximant.It is well seen that the Padé-type approximant is much more visually appropriate than Fourier one.
In order to assess the accuracy of the Fourier series method of and the Padé-type approximation, Fig. 3 presents their one-dimensional sections for comparison with the template function.This also demonstrates the advantage of the Padé approximation.
The size of the area on the integer grid was chosen in the range between 2 and 8, while the number of coefficients by which the reconstruction of the compressed image was performed, was gradually increased.For the compressed image this number (and, therefore, the volume of the graphic file) was approximately half of the value.Two extreme cases are schematically shown in Fig. 4.
A subjective assessment of the quality of the restored image can be obtained from Tab. 1, which shows the input and the reconstructed images.

DISCUSSIONS
Analyzing the graphs of the mean square error, one can notice a sharp decrease in the mean square error when the image approaches the psycho-visual similarity to the original.The results of the criteria calculations showed that each type of image has its own lower limit when the reconstructed image visually correlates with the initial one (Table 2).The study makes it possible to draw some conclusions about the practical use of the Padé-type approximation method and its advantages.
First of all, one can see the low level of noise for the Padé approximation (Fig. 5b) compared to the Fourier series for the cosine (Fig. 5a).
Secondly, the use of Padé-type approximation leads to a sharp decrease in the number of approximant parameters without the loss of accuracy (and even with its increase).Indeed, when using Fourier series with an equal number of N harmonics in both directions, the following number of parameters  Thus, the number of the parameters is more than halved: This is very important for the purpose of saving the images in digital signal processing and can provide a theoretical basis for building a new effective image format similar to the well-known jpeg format [1,2,10].

CONCLUSIONS
An important problem of applied mathematics is solved in order to reduce the Gibbs phenomenon for the harmonic two-dimensional Fourier series.
The scientific novelty of obtained results is that they demonstrate effective absence of distortions inherent to Gibbs phenomena for the Padé-type approximant.It is well seen that the Padé-type approximant is much more visually appropriate than Fourier one.Application of the Padé-type approximation also leads to the sufficient decrease of the approximants' parameter number without the loss of precision.
The practical significance of obtained results is that the software implementing the proposed method is fit for practical use along with the estimation of the appropriate application conditions.
Prospects for further research are to study the proposed method as a theoretical basis for building a new effective image format similar to the well-known jpeg format.
is an arbitrary function in the space under consideration; kp a are coefficients of harmonics for the 2D Fourier series of f; B i are countable sets of basic functions; ik e are basic functions; B is a basis of the space;   P is a two-dimensional Padé approximant; i m are maximum powers of 1 x for numerator and denominator of P ; i n are maximum powers of 2 a set of power values bounded by a right triangle with the axes being its legs, then the coefficients kp p and kp q can be calculated with the help of the following equations p-ISSN 1607-3274 Радіоелектроніка, інформатика, управління.2023.№ 1 e-ISSN 2313-688X Radio Electronics, Computer Science, Control.2023.№ 1 © Olevskyi V. I., Hnatushenko V. V., Korotenko G. M., Olevska Yu.B., Obydennyi Y. O., 2023 DOI 10.15588/1607-3274-2023-1-10

Figure 1 -
Figure 1 -Example of training samples formation from the original sample for the Fischer problem in the space

Figure 2 - 4 
obtained.Using the Padé-type approximation with the same powers of the numerator and denominator equal to N/2 gives the following number of parameters: Images of a -the template function, b -Fourier series 4 , c -Padé Approximant   2, 2 / 2, 2 .

Table 1 -
Initial and restored images with the number of harmonics N=8

Table 2 -
The number of harmonics for minimum error