Two-dimensional Fourier transform of the property. Fourier transform

Fashion & Style 03.10.2020
Fashion & Style

Linear filtering of images can be performed both in the spatial and frequency domains. In this case, it is considered that "low" spatial frequencies correspond to the main content of the image - the background and large-sized objects, and "high" spatial frequencies - small-sized objects, small details of large shapes and the noise component.

Traditionally, methods based on $\textit(Fourier transform)$ are used to move to the region of spatial frequencies. AT last years Methods based on $\textit(wavelet-transform)$ are also increasingly used.

Fourier transform.

The Fourier transform allows you to represent almost any function or data set as a combination of trigonometric functions such as sine and cosine, which allows you to identify periodic components in the data and evaluate their contribution to the structure of the original data or the shape of the function. Traditionally, there are three main forms of the Fourier transform: the integral Fourier transform, the Fourier series, and the discrete Fourier transform.

The integral Fourier transform transforms a real function into a pair of real functions or one complex function into another.

The real function $f(x)$ can be expanded in terms of an orthogonal system of trigonometric functions, that is, it can be represented as

$$ f\left(x \right)=\int\limits_0^\infty (A\left(\omega \right)) \cos \left((2\pi \omega x) \right)d\omega -\ int\limits_0^\infty (B\left(\omega \right)) \sin \left((2\pi \omega x) \right)d\omega , $$

where $A(\omega)$ and $B(\omega)$ are called integral cosine and sine transforms:

$$ A\left(\omega \right)=2\int\limits_(-\infty )^(+\infty ) (f\left(x \right)) \cos \left((2\pi \omega x )\right)dx; \quad B\left(\omega \right)=2\int\limits_(-\infty )^(+\infty ) (f\left(x \right)) \sin \left((2\pi \omega x )\right)dx. $$

The Fourier series represents the periodic function $f(x)$ defined on the interval $$ as an infinite series in sines and cosines. That is periodic function$f(x)$ is assigned an infinite sequence of Fourier coefficients

$$ f\left(x \right)=\frac(A_0 )(2)+\sum\limits_(n=1)^\infty (A_n ) \cos \left((\frac(2\pi xn)( b-a)) \right)+\sum\limits_(n=1)^\infty (B_n \sin \left((\frac(2\pi xn)(b-a)) \right)) , $$

$$ A_n =\frac(2)(b-a)\int\limits_a^b (f\left(x \right)) \cos \left((\frac(2\pi nx)(b-a)) \right)dx ; \quad B_n =\frac(2)(b-a)\int\limits_a^b (f\left(x \right)) \sin \left((\frac(2\pi nx)(b-a)) \right)dx . $$

The discrete Fourier transform transforms a finite sequence of real numbers into a finite sequence of Fourier coefficients.

Let $\left\( (x_i ) \right\), i= 0,\ldots, N-1 $ be a sequence of real numbers - for example, readings of pixel brightness along an image line. This sequence can be represented as a combination of finite sums of the form

$$ x_i =a_0 +\sum\limits_(n=1)^(N/2) (a_n ) \cos \left((\frac(2\pi ni)(N)) \right)+\sum\limits_ (n=1)^(N/2) (b_n \sin \left((\frac(2\pi ni)(N)) \right)) , $$

$$ a_0 =\frac(1)(N)\sum\limits_(i=0)^(N-1) (x_i ) , \quad a_(N/2) =\frac(1)(N)\sum \limits_(i=0)^(N-1) (x_i ) \left((-1) \right)^i, \quad a_k =\frac(2)(N)\sum\limits_(i=0) ^(N-1) (x_i \cos \left((\frac(2\pi ik)(N)) \right)), $$

$$ b_k =\frac(2)(N)\sum\limits_(i=0)^(N-1) (x_i \sin \left((\frac(2\pi ik)(N)) \right) ), \quad i\le k

The main difference between the three forms of the Fourier transform is that if the integral Fourier transform is defined over the entire domain of the function $f(x)$, then the series and the discrete Fourier transform are defined only on a discrete set of points, which is infinite for the Fourier series and finite for the discrete transformations.

As can be seen from the definitions of the Fourier transform, the greatest interest for digital signal processing systems is the discrete Fourier transform. Data obtained from digital media or information sources are ordered sets of numbers written as vectors or matrices.

It is usually assumed that the input data for a discrete transformation is a uniform sample with a step of $\Delta $, while the value $T=N\Delta $ is called the length of the record, or the main period. The fundamental frequency is equal to $1/T$. Thus, in the discrete Fourier transform, the input data is decomposed into frequencies that are an integer multiple of the fundamental frequency. The maximum frequency determined by the dimension of the input data is equal to $1/2 \Delta $ and is called $\it(Nyquist frequency)$. Accounting for the Nyquist frequency is essential when using a discrete transform. If the input data has periodic components with frequencies exceeding the Nyquist frequency, then when calculating the discrete Fourier transform, the high-frequency data will be replaced by a lower frequency, which can lead to errors in interpreting the results of the discrete transform.

An important tool for data analysis is also $\it(energy spectrum)$. The signal strength at the frequency $\omega $ is determined as follows:

$$ P \left(\omega \right)=\frac(1)(2)\left((A \left(\omega \right)^2+B \left(\omega \right)^2) \right ) . $$

This value is often called $\it(signal energy)$ at the frequency $\omega $. According to Parseval's theorem, the total energy of the input signal is equal to the sum of the energies over all frequencies.

$$ E=\sum\limits_(i=0)^(N-1) (x_i^2 ) =\sum\limits_(i=0)^(N/2) (P \left((\omega _i ) \right)) . $$

A plot of power versus frequency is called an energy spectrum or power spectrum. The energy spectrum makes it possible to reveal hidden periodicities in the input data and evaluate the contribution of certain frequency components to the structure of the input data.

Complex representation of the Fourier transform.

In addition to the trigonometric form of the discrete Fourier transform, $\it(complex representation)$ is widely used. The complex form of the Fourier transform is widely used in multivariate analysis and, in particular, in image processing.

The transition from trigonometric to complex form is carried out on the basis of the Euler formula

$$ e^(j\omega t)=\cos \omega t+j\sin \omega t, \quad j=\sqrt (-1) . $$

If the input sequence is $N$ complex numbers, then its discrete Fourier transform will be

$$ G_m =\frac(1)(N)\sum\limits_(n=1)^(N-1) (x_n ) e^(\frac(-2\pi jmn)(N)), $$

and the inverse transformation

$$ x_m =\sum\limits_(n=1)^(N-1) (G_n ) e^(\frac(2\pi jmn)(N)). $$

If the input sequence is an array of real numbers, then there is both a complex and a sine-cosine discrete transformation for it. The relationship of these representations is expressed as follows:

$$ a_0 =G_0 , \quad G_k =\left((a_k -jb_k ) \right)/2, \quad 1\le k\le N/2; $$

the remaining $N/2$ values ​​of the transformation are complex conjugate and carry no additional information. Therefore, the graph of the power spectrum of the discrete Fourier transform is symmetric with respect to $N/2$.

Fast Fourier Transform.

The simplest way to compute the Discrete Fourier Transform (DFT) is direct summation, which results in $N$ operations per coefficient. There are $N$ coefficients in total, so the total complexity is $O\left((N^2) \right)$. This approach is not of practical interest, since there are much more efficient ways to calculate the DFT, called the fast Fourier transform (FFT), which has $O (N\log N)$ complexity. The FFT only applies to sequences that have a length (number of elements) that is a multiple of a power of 2. The most general principle behind the FFT algorithm is to split the input sequence into two half-length sequences. The first sequence is filled with even-numbered data, and the second sequence is filled with odd-numbered data. This makes it possible to calculate the DFT coefficients through two $N/2$ transformations.

Denote $\omega _m =e^(\frac(2\pi j)(m))$, then $G_m =\sum\limits_(n=1)^((N/2)-1) (x_(2n ) ) \omega _(N/2)^(mn) +\sum\limits_(n=1)^((N/2)-1) (x_(2n+1) ) \omega _(N/2) ^(mn) \omega _N^m $.

For $m< N/2$ тогда можно записать $G_m =G_{\textrm{even}} \left(m \right)+G_{\textrm{odd}} \left(m \right)\omega _N^m $. Учитывая, что элементы ДПФ с индексом б ольшим, чем $N/2$, являются комплексно сопряженными к элементам с индексами меньшими $N/2$, можно записать $G_{m+(N/2)} =G_{\textrm{even}} \left(m \right)-G_{\textrm{odd}} \left(m \right)\omega _N^m $. Таким образом, можно вычислить БПФ длиной $N$, используя два ДПФ длиной $N/2$. Полный алгоритм БПФ заключается в рекурсивном выполнении вышеописанной процедуры, начиная с объединения одиночных элементов в пары, затем в четверки и так до полного охвата исходного массива данных.

Two-dimensional Fourier transform.

The discrete Fourier transform for a two-dimensional array of $M\times N$ numbers is defined as follows:

$$ G_(uw) =\frac(1)(NM)\sum\limits_(n=1)^(N-1) (\sum\limits_(m=1)^(M-1) (x_(mn ) ) ) e^((-2\pi j\left[ (\frac(mu)(M)+\frac(nw)(N)) \right]) ), $$

and the inverse transformation

$$ x_(mn) =\sum\limits_(u=1)^(N-1) (\sum\limits_(w=1)^(M-1) (G_(uw) ) ) e^( (2 \pi j\left[ (\frac(mu)(M)+\frac(nw)(N)) \right]) ). $$

In the case of image processing, the components of the 2D Fourier transform are called $\textit(spatial frequencies)$.

An important property of the two-dimensional Fourier transform is the possibility of its calculation using the one-dimensional FFT procedure:

$$ G_(uw) =\frac(1)(N)\sum\limits_(n=1)^(N-1) ( \left[ (\frac(1)(M)\sum\limits_(m= 0)^(M-1) (x_(mn) e^(\frac(-2\pi jmw)(M))) ) \right] ) e^(\frac(-2\pi jnu)(N) ), $$

Here, the expression in square brackets is a one-dimensional row transformation of the data matrix, which can be performed with a one-dimensional FFT. Thus, to obtain a two-dimensional Fourier transform, one must first calculate one-dimensional row transformations, write the results to the original matrix, and calculate one-dimensional transformations for the columns of the resulting matrix. When calculating the two-dimensional Fourier transform, low frequencies will be concentrated in the corners of the matrix, which is not very convenient for further processing of the information received. To translate the representation of a two-dimensional Fourier transform, in which low frequencies are concentrated in the center of the matrix, you can perform a simple procedure, which consists in multiplying the original data by $-1^(m+n)$.

On fig. 16 shows the original image and its Fourier transform.

Grayscale image and its Fourier image (images obtained in the LabVIEW system)

Convolution using the Fourier transform.

The convolution of functions $s(t)$ and $r(t)$ is defined as

$$ s\ast r\cong r\ast s\cong \int\limits_(-\infty )^(+\infty ) (s(\tau)) r(t-\tau)d\tau . $$

In practice, one has to deal with discrete convolution, in which continuous functions are replaced by sets of values ​​at the nodes of a uniform grid (usually an integer grid is taken):

$$ (r\ast s)_j \cong \sum\limits_(k=-N)^P (s_(j-k) r_k ). $$

Here $-N$ and $P$ define a range beyond which $r(t) = 0$.

When calculating the convolution using the Fourier transform, the property of the Fourier transform is used, according to which the product of the images of functions in the frequency domain is equivalent to the convolution of these functions in the time domain.

To calculate the reconciliation, it is necessary to transform the original data into the frequency domain, that is, calculate their Fourier transform, multiply the results of the transformation, and perform the inverse Fourier transform, restoring the original representation.

The only subtlety in the operation of the algorithm is related to the fact that in the case of a discrete Fourier transform (as opposed to a continuous one), two periodic functions are convolved, that is, our sets of values ​​​​specify precisely the periods of these functions, and not just the values ​​​​on some separate section of the axis. That is, the algorithm considers that the point $x_(N )$ is followed not by zero, but by the point $x_(0)$, and so on in a circle. Therefore, in order for the convolution to be correctly calculated, it is necessary to assign a sufficiently long sequence of zeros to the signal.

Filtering images in the frequency domain.

Linear filtering methods are among the well-structured methods for which efficient computational schemes based on fast convolution algorithms and spectral analysis have been developed. In general, linear filtering algorithms perform a transformation of the form

$$ f"(x,y) = \int\int f(\zeta -x, \eta -y)K (\zeta , \eta) d \zeta d \eta , $$

where $K(\zeta ,\eta)$ is the kernel of the linear transformation.

With a discrete representation of the signal, the integral in this formula degenerates into a weighted sum of samples of the original image within a certain aperture. In this case, the choice of the kernel $K(\zeta ,\eta)$ in accordance with one or another optimality criterion can lead to a number of useful properties (Gaussian smoothing in the regularization of the problem of numerical differentiation of an image, etc.).

Linear processing methods are most effectively implemented in the frequency domain.

The use of the Fourier image of the image to perform filtering operations is primarily due to the higher performance of such operations. As a rule, performing the direct and inverse two-dimensional Fourier transform and multiplying by the coefficients of the Fourier image of the filter takes less time than performing a two-dimensional convolution of the original image.

Filtering algorithms in the frequency domain are based on the convolution theorem. In the two-dimensional case, the convolution transformation looks like this:

$$ G\left((u,v) \right)=H\left((u,v) \right)F\left((u,v) \right), $$

where $G$ is the Fourier transform of the convolution result, $H$ is the Fourier transform of the filter, and $F$ is the Fourier transform of the original image. That is, in the frequency domain, the two-dimensional convolution is replaced by element-wise multiplication of the images of the original image and the corresponding filter.

To perform rollup, you need to do the following:

  1. Multiply the elements of the original image by $-1^(m+n)$ to center the Fourier image.
  2. Compute the Fourier transform of $F(u,v)$ using the FFT.
  3. Multiply the Fourier transform of $F(u,v)$ by the frequency function of the filter $H(u,v)$.
  4. Calculate the inverse Fourier transform.
  5. Multiply the real part of the inverse transformation by $-1^(m+n)$.

The relationship between the filter function in the frequency domain and the spatial domain can be determined using the convolution theorem

$$ \Phi \left[ (f\left((x,y) \right)\ast h(x,y)) \right]=F\left((u,v) \right)H\left(( u,v) \right), $$

$$ \Phi \left[ (f\left((x,y) \right)h(x,y)) \right]=F\left((u,v) \right)\ast H\left(( u,v)\right). $$

The convolution of a function with an impulse function can be represented as follows:

$$ \sum\limits_(x=0)^M (\sum\limits_(y=0)^N (s\left((x,y) \right)) ) \delta \left((x-x_0 , y-y_0 ) \right)=s(x_0 ,y_0). $$

Fourier transform of the impulse function

$$ F\left((u,v) \right)=\frac(1)(MN)\sum\limits_(x=0)^M (\sum\limits_(y=0)^N (\delta \ left((x,y) \right) ) ) e^( (-2\pi j\left((\frac(ux)(M)+\frac(vy)(N)) \right)) ) =\ frac(1)(MN). $$

Let $f(x,y) = \delta (x,y)$, then the convolution

$$ f\left((x,y) \right)\ast h(x,y)=\frac(1)(MN)h\left((x,y) \right), $$

$$ \Phi \left[ (\delta \left((x,y) \right)\ast h(x,y)) \right]=\Phi \left[ (\delta \left((x,y) \right)) \right]H\left((u,v) \right)=\frac(1)(MN)H\left((u,v) \right). $$

It can be seen from these expressions that the filter functions in the frequency and spatial domains are interconnected through the Fourier transform. For a given frequency domain filter function, you can always find the corresponding spatial domain filter by applying the inverse Fourier transform. The same is true for the reverse case. Using this relationship, it is possible to determine the procedure for the synthesis of spatial linear filters.

  1. We determine the required characteristics (shape) of the filter in the frequency domain.
  2. We perform the inverse Fourier transform.
  3. The resulting filter can be used as a mask for spatial convolution, while the size of the mask can be reduced compared to the size of the original filter.

($\textit(Ideal low-pass filter)$) $H(u,v)$ is $$H(u,v) = 1, \quad \mbox(if )D(u,v)< D_0 ,$$ $$H(u,v) = 0, \quad \mbox{если }D(u,v) \ge D_0 ,$$ где $D\left({u,v} \right)=\sqrt {\left({u-\frac{M}{2}} \right)^2+\left({v-\frac{N}{2}} \right)^2}$ - расстояние от центра частотной плоскости.

($\textit(Ideal high-pass filter)$) is obtained by inverting the ideal low-pass filter:

$$ H"(u,v) = 1-H(u,v). $$

Here, the low-frequency components are completely suppressed while maintaining the high-frequency ones. However, as in the case of an ideal low-pass filter, its use is fraught with the appearance of significant distortion.

Various approaches are used to design filters with minimal distortion. One of them is exponent-based filter synthesis. Such filters introduce minimal distortion into the resulting image and are convenient for synthesis in the frequency domain.

Widely used in image processing is a family of filters based on the real Gaussian function.

$\textit(Low Pass Gaussian Filter)$ has the form

$$ h\left(x \right)=\sqrt (2\pi ) \sigma Ae^(-2\left((\pi \sigma x) \right)^2) \mbox( and ) H\left( u \right)=Ae^(-\frac(u^2)(2\sigma ^2)) $$

The narrower the filter profile in the frequency domain (the larger $\sigma $), the wider it is in the spatial domain.

($\textit(High Pass Gaussian Filter)$) has the form

$$ h\left(x \right)=\sqrt (2\pi ) \sigma _A Ae^(-2\left((\pi \sigma _A x) \right)^2)-\sqrt (2\pi ) \sigma _B Be^(-2\left((\pi \sigma _B x) \right)^2 ), $$

$$ H\left(u \right)=Ae^(-\frac(u^2)(2\sigma _A^2 ))-Be^(-\frac(u^2)(2\sigma _B^2 )). $$

In the two-dimensional case ($\it(low-pass)$) the Gaussian filter looks like this:

$$ H\left((u,v) \right)=e^(-\frac(D^2\left((u,v) \right))(2D_0^2 )). $$

($\it(High-Pass)$) Gaussian filter has the form

$$ H\left((u,v) \right)=1-e^(-\frac(D^2\left((u,v) \right))(2D_0^2 )). $$

Consider an example of image filtering (Fig. 1) in the frequency domain (Fig. 17 - 22). Note that frequency filtering of an image can make sense both for smoothing ($\textit(low-pass filtering)$) and for highlighting contours and small-sized objects ($\textit(high-pass filtering)$).

As can be seen from fig. 17, 19, as the "power" of filtering in the low-frequency component of the image increases, the effect of "apparent defocusing" or $\it(blur)$ of the image becomes more pronounced. At the same time, a large part of the information content of the image gradually passes into the high-frequency component, where at the beginning only the contours of objects are observed (Fig. 18, 20 - 22).

Let us now consider the behavior of high-pass and low-pass filters (Fig. 23 - 28) in the presence of additive Gaussian noise in the image (Fig. 7).

As can be seen from fig. 23, 25, the properties of low-frequency filters in suppressing additive random noise are similar to the properties of the previously considered linear filters - with sufficient filter power, noise is suppressed, but the price for this is a strong blurring of the contours and "defocusing" of the entire image. The high-frequency component of a noisy image ceases to be informative, since in addition to the contour and object information, the noise component is now also fully present there (Fig. 27, 28).

The use of frequency methods is most appropriate when the statistical model of the noise process and/or the optical transfer function of the image transmission channel are known. It is convenient to take into account such a priori data by choosing a generalized controllable (by parameters $\sigma$ and $\mu$) filter of the following form as a restoring filter:

$$ F(w_1,w_2)= \left[ ( \frac (1) (P(w_1,w_2)) )\right] \cdot \left[ (\frac ((\vert P(w_1,w_2) \vert )^2) (\vert P(w_1,w_2) \vert ^2 + \alpha \vert Q(w_1,w_2) \vert ^2) )\right]. $$

where $0< \sigma < 1$, $0 < \mu < 1$ - назначаемые параметры фильтра, $P(w_{1}$, $w_{2})$ - передаточная функция системы, $Q(w_{1}$, $w_{2})$ - стабилизатор фильтра, согласованный с энергетическим спектром фона. Выбор параметров $\sigma = 1$, $\mu = 0$ приводит к чисто инверсной фильтрации, $\sigma =\mu = 1$ к \it{винеровской фильтрации}, что позволяет получить изображение, близкое к истинному в смысле минимума СКО при условии, что спектры плотности мощности изображения и его шумовой компоненты априорно известны. Для дальнейшего улучшения эффекта сглаживания в алгоритм линейной (винеровской) фильтрации вводят адаптацию, основанную на оценке локальных статистик: математического ожидания $M(P)$ и дисперсии $\sigma (P)$. Этот алгоритм эффективно фильтрует засоренные однородные поверхности (области) фона. Однако при попадании в скользящее окно обработки неоднородных участков фона импульсная характеристика фильтра сужается ввиду резкого изменения локальных статистик, и эти неоднородности (контуры, пятна) передаются практически без расфокусировки, свойственной неадаптивным методам линейной фильтрации.

The advantages of linear filtering methods include their clear physical meaning and ease of analysis of the results. However, with a sharp deterioration in the signal-to-noise ratio, with possible variants of areal noise and the presence of high-amplitude impulse noise, linear preprocessing methods may not be sufficient. In this situation, nonlinear methods are much more powerful.

The discrete two-dimensional Fourier transform of the image sample matrix is ​​defined as a series:

where , and the discrete inverse transformation has the form:

By analogy with the terminology of the continuous Fourier transform, the variables are called spatial frequencies. It should be noted that not all researchers use the definition (4.97), (4.98). Some prefer to put all scale constants in the inverse expression, while others reverse the signs in the kernels.

Since the transformation kernels are symmetrical and separable, the two-dimensional transformation can be performed as successive one-dimensional transformations over the rows and columns of the image matrix. The basic transformation functions are exponents with complex exponents, which can be decomposed into sine and cosine components. In this way,

The spectrum of the image has many interesting structural features. Spectral component at the origin of the frequency plane

equal to the increase in N times the average (over the original plane) value of the image brightness.

Substituting into equality (4.97)

where and are constants, we get:

For any integer values ​​and the second exponential factor of equality (4.101) becomes one. Thus, at ,

which indicates the periodicity of the frequency plane. This result is illustrated in Figure 4.14, a.

The 2D Fourier spectrum of an image is essentially a representation of the 2D field as a Fourier series. In order for such a representation to be valid, the original image must also have a periodic structure, i.e. have a pattern that repeats vertically and horizontally (Fig. 4.14, b). Thus, the right edge of the image is adjacent to the left, and the top edge is adjacent to the bottom. Due to discontinuities in the brightness values ​​in these places, additional components appear in the image spectrum, which lie on the coordinate axes of the frequency plane. These components are not related to the brightness values ​​of the internal pixels of the image, but they are necessary to reproduce its sharp edges.

If an array of image samples describes a luminance field, then the numbers will be real and positive. However, the Fourier spectrum of this image generally has complex values. Since the spectrum contains a component representing the real and imaginary parts, or the phase and modulus of the spectral components for each frequency, it may seem that the Fourier transform increases the image dimension. This, however, is not the case, since it has symmetry under complex conjugation. If in equality (4.101) we set and equal to integers, then after complex conjugation we get the equality:

With the help of substitution and src=http://electrono.ru/wp-content/image_post/osncifr/pic126_15.gif> we can show that

Due to the presence of complex conjugate symmetry, almost half of the spectral components turn out to be redundant, i.e. they can be formed from the remaining components (Fig. 4.15). Of course, harmonics that fall not in the lower, but in the right half-plane can, of course, be considered excess components.

Fourier analysis in image processing is used for the same purposes as for one-dimensional signals. However, in the frequency domain, images do not represent any meaningful information, which makes the Fourier transform not such a useful tool for image analysis. For example, when a Fourier transform is applied to a one-dimensional audio signal, a hard-to-formal and complex waveform in the time domain is transformed into an easy-to-understand spectrum in the frequency domain. By comparison, by taking the Fourier transform (Fourier transform) of an image, we transform ordered information in the spatial domain (spatial domain) into an encoded form in the frequency domain (frequency domain). In short, don't expect the Fourier transform to help you understand the information encoded in the images.

Likewise, don't refer to the frequency domain when designing a filter. Basic characteristic feature in images is a border - a line separating one an object or region from another object or areas. Since the contours in the image contain a wide range of frequency components, then trying to change the image by manipulating the frequency spectrum is an ineffective task. Image processing filters are usually designed in the spatial domain, where information is presented in its simplest and most accessible form. When solving image processing problems, it is rather necessary to operate in terms of operations smoothing and underscores contours (spatial domain) than in terms of high pass filter and low pass filter(frequency domain).

Despite this, Fourier image analysis has several useful properties. For example, convolution in the spatial domain corresponds to multiplication in the frequency domain. This is important because multiplication is a simpler mathematical operation than convolution. As with 1D signals, this property allows you to convolve using an FFT and use various methods deconvolution. Other useful property in the frequency domain is Fourier sector theorem, which establishes correspondences between the image and its projections (views of the same image with various parties). This theorem forms the theoretical basis of such directions as computed tomography, fluoroscopy widely used in medicine and industry.

The frequency spectrum of an image can be calculated in several ways, but the most practical method for computing the spectrum is the FFT algorithm. When using the FFT algorithm, the original image must contain N lines and N columns, and the number N must be a multiple of the power of 2, i.e. 256, 512, 1024 and

etc. If the source image is not a multiple of a power of 2 in dimension, then zero-value pixels must be added to pad the image to the desired size. Due to the fact that the Fourier transform preserves the order of the information, the amplitudes of the low-frequency components will be located at the corners of the two-dimensional spectrum, while the high-frequency components will be in its center.

As an example, consider the result of the Fourier transform of an electron microscope image of the input stage of an operational amplifier (Fig. 4.16). Since the frequency domain can contain pixels with negative values, the gray scale of these images is shifted in such a way that negative values ​​are perceived as dark points in the image, zero values ​​are gray, and positive values ​​are bright. Usually, the low-frequency components of the image spectrum are much larger in amplitude than the high-frequency ones, which explains the presence of very bright and very dark dots in the four corners of the spectrum image (Fig. 4.16, b). As can be seen from the figure, a typical

19 Ticket 1. Dilation operation

2. Spatial-spectral features

dilatation operations.

Let A and B be sets from the space Z 2 . The dilatation of a set A with respect to a set B (or with respect to B) is denoted by A⊕B and is defined as

It can be rewritten in the following form:

The set B will be called a structure-forming set or a dilation primitive.

Eq. (11) is based on obtaining a central reflection of the set B relative to its initial coordinates (center B), then shifting this set to the point z, dilating the set A along B – the set of all such shifts z, at which and A coincide in at least one element.

This definition is not the only one. However, the dilation procedure is in some ways similar to the convolution operation that is performed on sets.


Spatial spectral features

In accordance with (1.8), the two-dimensional Fourier transform is defined as

where w x, w y are spatial frequencies.

The square of the modulus of the spectrum M( w x, w y) = |Ф( w x, w y)| 2 can be used to calculate a number of features. Function integration M(w x, w y) by the angle on the plane of spatial frequencies gives a spatial-frequency feature that is invariant with respect to the shift and rotation of the image. By introducing the function M(w x, w y) in polar coordinates, we write this feature in the form


where q= arctan ( w y/w x); r 2 = w x 2 +w y 2 .

The feature is invariant with respect to scale


20 ticket 1. Erosion operation

Let f(x 1 , x 2) is a function of two variables. By analogy with the one-dimensional Fourier transform, we can introduce a two-dimensional Fourier transform:

The function at fixed values ​​ω 1 , ω 2 describes a plane wave in the plane x 1 , x 2 (Figure 19.1).

The quantities ω 1 , ω 2 have the meaning of spatial frequencies and the dimension mm−1 , and the function F(ω 1 , ω 2) determines the spectrum of spatial frequencies. A spherical lens is capable of calculating the spectrum of an optical signal (Figure 19.2). In Figure 19.2, the following notations are introduced: φ - focal length,

Figure 19.1 - To the definition of spatial frequencies

The two-dimensional Fourier transform has all the properties of the one-dimensional transform, in addition, we note two additional properties, the proof of which follows easily from the definition of the two-dimensional Fourier transform.


Figure 19.2 - Calculation of the spectrum of the optical signal using
spherical lens

Factorization. If a two-dimensional signal is factorized,

then its spectrum is also factorized:

Radial symmetry. If the 2D signal is radially symmetrical, that is

Where is the zero order Bessel function. The formula that determines the relationship between a radially symmetric two-dimensional signal and its spatial spectrum is called the Hankel transform.


LECTURE 20. Discrete Fourier transform. low pass filter

The Direct Two-Dimensional Discrete Fourier Transform (DFT) transforms an image given in a spatial coordinate system ( x, y), into a two-dimensional discrete image transformation specified in the frequency coordinate system ( u, v):

The Inverse Discrete Fourier Transform (IDFT) has the form:

It can be seen that the DFT is a complex transformation. The modulus of this transformation represents the amplitude of the image spectrum and is calculated as the square root of the sum of the squares of the real and imaginary parts of the DFT. The phase (phase shift angle) is defined as the arc tangent of the ratio of the imaginary part of the DFT to the real part. The energy spectrum is equal to the square of the amplitude of the spectrum, or the sum of the squares of the imaginary and real parts of the spectrum.



Convolution theorem

According to the convolution theorem, the convolution of two functions in the space domain can be obtained by the ODFT of the product of their DFT, i.e.

Filtering in the frequency domain allows you to select the frequency response of the filter from the DFT of the image, providing the necessary image transformation. Consider the frequency response of the most common filters.

We recommend reading

Top