Application of two-dimensional fast Fourier transform algorithm, analog of the Cooley-Tukey algorithm, for 4k fixed format digital image of satellite data in frequency domain processing

. Currently, digital images in the format Full HD (1920 * 1080 pixels) and 4K (4096 * 3072) are widespread. This article will consider the option of processing a similar image in the frequency domain. As an example, take a snapshot of the earth's surface. The discrete Fourier transform will be computed using a two-dimensional analogue of the Cooley-Tukey algorithm and in a standard way by rows and columns. Let us compare the required number of operations and the results of a numerical experiment. Consider the examples of image filtering.


Introduction
Currently, digital images in the format Full HD (1920 * 1080 pixels) and 4K (4096 * 3072) are widespread. For their processing, spatial filtering methods are mainly used, since they do not require significant image size restrictions [1]. In this paper, we consider the possibility of using an alternative method -the frequency filtering of such images by calculating the two-dimensional discrete Fourier transform of the function of the brightness of the pixels of the image, applying a filter, and computing the inverse Fourier transform [2].
Consider the method using the example of a remote sensing image of the Earth in 4K format, consisting of 4096 * 3072 pixels. At that N = 4096 = 2 12 , M = 3072 = 3*2 10 . In this case, for the direct calculation of the two-dimensional discrete Fourier transform (DFT), M 4 * N 4 = 9*2 44 operations of complex addition and multiplication are required. One way to simplify the calculations is to use the classical algorithm for computing the two-dimensional fast Fourier transform (FFT): first, the one-dimensional FFT using the Cooley-Tukey algorithm for each row consisting of 4096 elements is calculated, and then the discrete Fourier transform for each column of 3072 elements. In this case, 18*2 22 + 9*2 32 = 9234*2 22 ≈ 9*2 32 operations of multiplication and 72*2 22 + 9*2 32 = 9288*2 22 ≈ 9*2 32 addition of complex numbers are required. In that event, the main restriction on the application of the Cooley-Tukey algorithm comes into force. More precisely the size of the one-dimensional array f(x) should be degree 2 (N = 2 s ). To simplify the calculations, you can convert the original image so that the width and height of the picture consisted of N = 4096 = 2 12 samples. For a given 4K format, you will have to add almost one fourth of all the pixels (which will introduce noticeable distortions into the image, or significantly expand the boundaries of the original image), and then apply a two-dimensional analog of the Cooley-Tukey algorithm [3][4][5]

Application of a two-dimensional analogue of the Cooley-Tukey algorithm
We will use another way of representing the original 4K format image. In [6], a modification of a two-dimensional analogue of the Cooley -Tukey algorithm for a rectangular signal with N * M 1 samples was considered. To calculate it, you will need multiplication and addition of complex numbers.

N NM
We divide the original signal into 3 blocks with 4096*1024 samples by the multiplicity of the index: a multiple of 3 -up, the remainder of dividing by 3 is 1 -to the center, and the remainder of dividing by 3 is 2 -down. As a result, we obtain the sum of three sub-signals in which the sides are a power of two and can be applied [4]. As the table shows, the slowest way to calculate the two-dimensional Fourier transform for a 4K image (4096 * 3072 pixels) is to directly calculate the two-dimensional DFT (it is most rarely used due to the large number of operations required). Significant speedup of calculations allows us to obtain the classical way of calculating the two-dimensional Fourier transform: first, in rows (for a signal with 4096 samples) using a one-dimensional Cooley-Tukey FFT, and then in columns using DFT (3072 samples). Converting the original image to a signal with 4096 * 4096 samples makes it possible to reduce by one or two orders of magnitude the number of operations required for complex multiplication and addition using a two-dimensional analog of the Cooley-Tukey algorithm. Dividing the original image into 3 sub-signals with 4096 * 1024 samples allows applying a twodimensional FFT to each received sub-signal according to the analogy of the Cooley-Tukey algorithm for a square-wave signal, which further reduces the number of required complex number operations by an order of magnitude.
As a result, we find that the algorithm for calculating the two-dimensional fast Fourier transform using an analog of the Cooley-Tukey algorithm for a fixed 4K image (4096 * 3072 pixels) requires fewer multiplication and addition of complex numbers than the other methods presented. However, this algorithm does not require pre-processing of images in 4K format.
To test the modification of the algorithm, a program was written in the C ++ programming language. Testing was carried out on a computer with an AMD FX-4170 4.2 GHz processor, 16 gigabytes of RAM, the Windows 7 operating system. The result of comparing the running time in seconds of two-dimensional FFT calculation algorithms is presented in Table 2. As can be seen from table 2, the modified analog of the Cooley-Tukey algorithm for a 4K image is faster than the analog of the Cooley-Tukey algorithm with the addition of a signal to a size of 4096 * 4096 samples.

Image filtering
Consider the result of applying the described algorithm for frequency filtering of images (the filtering mechanism is described in more detail in [6][7][8]). As a test signal, we used a photograph of Krasnoyarsk and its environs from the LandSat-8 satellite dated July 4, 2016 in Figure 1 on the left. The original resolution of the image is 8081 * 8171 pixels [9][10]. The signal was converted to 4K format, namely 4096 * 3072, as one example of widespread images. The right-hand side of Figure 1 shows the result of high-frequency image filtering (for more details on the use of filtering in the frequency domain, see [6]). In this case, the contours became noticeable: the river, the boundaries of the rocky sections, and the image itself became more contrasting.  Figure 2 on the left shows the original image, on the right -the result of low-pass filtering. In this case, small changes in the mountainous terrain are not so noticeable against the general background. The image has become less contrast and more uniform. Sudden transitions of image brightness disappeared, color saturation was added [11].

Conclusion
The article shows the use of a two-dimensional analogue of the Cooley-Tukey algorithm for frequency filtering of images in 4K format, requiring fewer multiplication and addition of complex numbers than other methods of processing such images. Several methods are compared, the results of a numerical experiment are given, and examples of image filtering based on a photograph of the earth's surface are shown.