# Gabor transform

## cqt

### Description

example

returns the constant-Q transform (CQT), , of the input signal . The input signal must have at least four samples.

• If is a vector, then returns a matrix corresponding to the CQT.

• If is a matrix, then obtains the CQT for each column (independent channel) of . The function returns a multidimensional array corresponding to the maximally redundant version of the CQT.

example

returns the approximate bandpass center frequencies, , corresponding to the rows of . The frequencies are ordered from 0 to 1 and are in cycles/sample.

returns the Gabor frames, , used in the analysis of and the frequency shifts, , in discrete Fourier transform (DFT) bins between the passbands in the rows of .

, , and are required inputs for the inversion of the CQT with .

returns the frequency intervals, , corresponding the rows of . The th element of is the frequency shift in DFT bins between the and element of with where is the number of frequency shifts. Because MATLAB® indexes from 1, contains the frequency shift between and , contains the frequency shift between and , and so on.

example

returns the CQT with additional options specified by one or more pair arguments, using any of the preceding syntaxes.

example

with no output arguments plots the CQT in the current figure. Plotting is supported for vector inputs only. If the input signal is real and is the sampling frequency, the CQT is plotted over the range . If the signal is complex, the CQT is plotted over the range [).

Note

In order to visualize a sparse CQT, coefficients have to be interpolated. When interpolation occurs, the plot can have significant smearing and be difficult to interpret. If you want to plot the CQT, we recommend using the default value .

collapse all

### Constant-Q Transform Using Default Values

Load a signal and obtain the constant-Q transform.

### Center Frequencies of the Constant-Q Transform

Load a real-valued signal and obtain the constant-Q transform. Return the approximate bandpass center frequencies.

Plot on a logarithmic scale the bandpass center frequencies through the Nyquist frequency.

lfreq = length(f); nyquistBin = floor(lfreq/2)+1; plot(f(1:nyquistBin)) title('Bandpass Center Frequencies') grid on set(gca,'yscale','log')

To confirm the ratios of consecutive pairs of frequencies are constant, plot the ratios. Since uses 12 bins per octave by default, the ratio should equal . Since the DC and Nyquist frequencies are not members of the geometric sequence of center frequencies but are included in the frequency vector, exclude them from the plot.

figure plot(f(3:nyquistBin-1)./f(2:nyquistBin-2)) grid on title(['Ratio: ',num2str(2^(1/12))])

### Visualize and Apply Constant-Q Transform Gabor Frames

Obtain the minimally redundant constant-Q transform of an audio signal. Use the Blackman-Harris window as the prototype function for the Gabor frames.

load handel df = Fs/numel(y); [cfs,f,g,fshifts,fintervals,bw] = cqt(y,'SamplingFrequency',Fs,'TransformType',"sparse",'Window',"blackmanharris");

is a cell array, where each element in the array corresponds to a bandpass center frequency and Gabor frame. Plot the Gabor frame associated with the Nyquist frequency.

lf = length(f); ind = floor(lf/2)+1; gFrame = fftshift(g{ind}); fvec = f(ind-1):df:f(ind+1)-df; plot(fvec,gFrame) xlabel('Frequency (Hz)') grid on title({['Gabor Frame - Freq: ',num2str(f(ind)),' Hz'];['Bandwidth ',num2str(bw(ind)*Fs/numel(y)),' Hz']})

In the constant-Q transform, the Gabor frames are applied to the discrete Fourier transform of the input signal, and the inverse discrete Fourier transform is performed. The k-th Gabor frame is applied to the k-th frequency interval specified in . Take the discrete Fourier transform of the signal and plot its magnitude spectrum. Use to indicate over which Fourier coefficients are the Gabor frame associated with the Nyquist frequency are applied.

yDFT = fft(y); lyDFT = length(yDFT); plot(Fs*(0:lyDFT-1)/lyDFT,abs(yDFT)) grid on fIntervalGabor = fintervals{ind}; mx = max(abs(yDFT)); hold on plot([df*fIntervalGabor(1) df*fIntervalGabor(1)],[0 mx],'r-','LineWidth',2) plot([df*fIntervalGabor(end) df*fIntervalGabor(end)],[0 mx],'r-','LineWidth',2) str = sprintf('Gabor Frame Interval (Hz): [%3.2f, %3.2f]',df*fIntervalGabor(1),df*fIntervalGabor(end)); title(str)

Window the Fourier coefficients in the interval with the Gabor frame, and take the inverse discrete Fourier transform. Normalize the result, and compare with computed constant-Q coefficients and confirm they are equal.

lGframe = length(gFrame); indx = 1:lGframe; indx = fftshift(indx); winDFT(indx) = yDFT(fIntervalGabor).*fftshift(gFrame(indx)); cqCoefs = ifft(winDFT); cqCoefs = (2*lGframe/length(y))*cqCoefs; max(abs(cqCoefs(:)-cfs{ind}(:)))

### Constant-Q Transform of Audio Signal

Load an audio signal. Plot the constant-Q transform (CQT) using the maximally redundant version of the transform and using 12 bins per octave.

Perform the CQT of the same signal using 48 bins per octave. Set the frequency range over which the CQT has a logarithmic frequency response to be the minimum allowable frequency to 2 kHz.

minFreq = Fs/length(y); maxFreq = 2000; figure cqt(y,'SamplingFrequency',Fs,'BinsPerOctave',48,'FrequencyLimits',[minFreq maxFreq])

collapse all

### — Input signalvector | matrix

Input signal, specified as a real or complex vector or matrix. must have at least four samples.

Data Types:
Complex Number Support: Yes

### Name-Value Arguments

Specify optional comma-separated pairs of arguments. is the argument name and is the corresponding value. must appear inside quotes. You can specify several name and value pair arguments in any order as .

Example:

### — Sampling frequencypositive scalar

Sampling frequency, in Hz, specified as the comma-separated pair consisting of and a positive scalar.

### — Number of bins per octave12 (default) | positive integer from 1 to 96

Number of bins per octave to use in the CQT, specified as a positive integer from 1 to 96.

### — Type of constant-Q transform (default) |

Type of constant-Q transform to perform, specified as the comma-separated pair consisting of and or . The sparse transform is the minimally redundant version of the constant-Q transform.

### — Frequency limitstwo-element real vector

Frequency limits over which the CQT has a logarithmic frequency response with the specified number of frequency bins per octave, specified as the comma-separated pair and a two-element real vector.

• The first element must be greater than or equal to , where is the sampling frequency and is the length of the signal.

• The second element must be strictly less than the Nyquist frequency.

### — Window to use as prototype function (default) | | | |

Window to use as the prototype function for the nonstationary Gabor frames, specified as , , , , or . These compactly support functions are defined in frequency. For normalized frequencies, they are defined on the interval . If you specify a sampling frequency, , they are defined on the interval .

collapse all

### — Constant-Q transformmatrix | multidimensional array | cell array | structure array

Constant-Q transform, returned as a matrix, multidimensional array, cell array, or structure array.

• If is specified as without , is a matrix or multidimensional array.

• If is a vector, then returns a matrix corresponding to the CQT.

• If is a matrix, then obtains the CQT for each column (independent channel) of . The function returns a multidimensional array corresponding to the maximally redundant version of the CQT.

The array, , corresponds to the maximally redundant version of the CQT. Each row of the pages of corresponds to passbands with normalized center frequencies (cycles/sample) logarithmically spaced between 0 and 1. A normalized frequency of 1/2 corresponds to the Nyquist frequency. The number of columns, or hops, corresponds to the largest bandwidth center frequency, which usually occurs one frequency bin below or above the Nyquist bin.

• If is specified as and you specify frequency limits, is returned as a structure array with the following four fields.

• — Coefficient matrix of multidimensional array for the frequencies within the specified frequency limits. This includes both the positive and "negative" frequencies.

• — Coefficient vector or matrix for the passband from 0 to the lower frequency limit.

• — Coefficient vector or matrix for the passband from the upper frequency limit to the Nyquist.

• — DFT bin corresponding to the Nyquist frequency. This field is used when inverting the CQT.

• If is specified as , is a cell array with the number of elements equal to the number of bandpass frequencies. Each element of the cell array, , is a vector or matrix with the number of rows equal to the value of the bandwidth in DFT bins, .

, , and are required inputs for the inversion of the CQT with .

### — Approximate bandpass center frequenciesreal-valued vector

Approximate bandpass center frequencies corresponding to the rows of , returned as a real-valued vector. The frequencies are ordered from 0 to 1 and are in cycles/sample. If you specified , then is in Hertz.

### — Gabor framescell array of real-valued vectors

Gabor frames used in the analysis of , returned as a cell array of real-valued vectors. Each vector in corresponds to a row of .

, , and are required inputs for the inversion of the CQT with .

### — Frequency shiftsreal-valued vector

Frequency shifts in discrete Fourier transform bins, returned as a real-valued vector. The shifts are between the passbands in the rows of .

, , and are required inputs for the inversion of the CQT with .

### — Frequency intervalscell array of real-valued vectors

Frequency intervals corresponding to the rows of , returned as a cell array. Each element in is a real-valued vector. The th element of is the frequency shift in DFT bins between the and element of with where is the number of frequency shifts. Because MATLAB indexes from 1, contains the frequency shift between and , contains the frequency shift between and , and so on.

### — Bandwidthsreal-valued vector

Bandwidths in DFT bins of the frequency intervals, , returned as a real-valued vector.

collapse all

### Nonstationary Gabor Frames

The theory of nonstationary Gabor (NSG) frames for frequency-adaptive analysis and efficient algorithms for analysis and synthesis using NSG frames are due to Dörfler, Holighaus, Grill, and Velasco ,. The algorithms used in CQT and ICQT were developed by Dörfler, Holighaus, Grill, and Velasco and are described in ,. In , Schörkhuber, Klapuri, Holighaus, and Dörfler develop and provide algorithms for a phase-corrected CQT transform which matches the CQT coefficients that would be obtained by naïve convolution. The Large Time-Frequency Analysis Toolbox (https://github.com/ltfat) provides an extensive suite of algorithms for nonstationary Gabor frames .

### Perfect Reconstruction

To achieve the perfect reconstruction property of the constant-Q analysis with nonstationary Gabor frames, internally prepends the zero frequency (DC) and appends the Nyquist frequency to the frequency interval. The negative frequencies are mirrored versions of the positive center frequencies and bandwidths

### References

 Holighaus, N., M. Dörfler, G. A. Velasco, and T. Grill. "A framework for invertible real-time constant-Q transforms." IEEE Transactions on Audio, Speech, and Language Processing. Vol. 21, No. 4, 2013, pp. 775–785.

 Velasco, G. A., N. Holighaus, M. Dörfler, and T. Grill. "Constructing an invertible constant-Q transform with nonstationary Gabor frames." In Proceedings of the 14th International Conference on Digital Audio Effects (DAFx-11). Paris, France: 2011.

 Schörkhuber, C., A. Klapuri, N. Holighaus, and M. Dörfler. "A Matlab Toolbox for Efficient Perfect Reconstruction Time-Frequency Transforms with Log-Frequency Resolution." Submitted to the AES 53rd International Conference on Semantic Audio. London, UK: 2014.

 Průša, Z., P. L. Søndergaard, N. Holighaus, C. Wiesmeyr, and P. Balazs. The Large Time-Frequency Analysis Toolbox 2.0. Sound, Music, and Motion, Lecture Notes in Computer Science 2014, pp 419-442.

### C/C++ Code GenerationGenerate C and C++ code using MATLAB® Coder™.

Usage notes and limitations:

• The value of the name-value pair argument must be constant. Use .

• Plotting is not supported.

Introduced in R2018a

You have a modified version of this example. Do you want to open this example with your edits?

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web site

You can also select a web site from the following list:

### How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Sours: https://www.mathworks.com/help/wavelet/ref/cqt.html

## Effective Approach to Calculate Analysis Window in Infinite Discrete Gabor Transform

The long-periodic/infinite discrete Gabor transform (DGT) is more effective than the periodic/finite one in many applications. In this paper, a fast and effective approach is presented to efficiently compute the Gabor analysis window for arbitrary given synthesis window in DGT of long-periodic/infinite sequences, in which the new orthogonality constraint between analysis window and synthesis window in DGT for long-periodic/infinite sequences is derived and proved to be equivalent to the completeness condition of the long-periodic/infinite DGT. By using the property of delta function, the original orthogonality can be expressed as a certain number of linear equation sets in both the critical sampling case and the oversampling case, which can be fast and efficiently calculated by fast discrete Fourier transform (FFT). The computational complexity of the proposed approach is analyzed and compared with that of the existing canonical algorithms. The numerical results indicate that the proposed approach is efficient and fast for computing Gabor analysis window in both the critical sampling case and the oversampling case in comparison to existing algorithms.

#### 1. Introduction

The discrete Gabor transform (DGT) , extended from the short-time Fourier transform (STFT), is an important time-frequency analysis tool for processing and analyzing the nonstationary signal [2–4], which multiplied a signal by a time-shifted and frequency-modulated window function with the aim of representing analyzed signals in a time-frequency localized manner. As a general case of STFT, DGT, sampled version of the STFT, is an efficient tool for analyzing the energy distribution of analyzed signals in the time-frequency domain/plane and more valuable than Fourier transform (FT) in many applications which require to extract temporal frequency information and localize simultaneously. According to the type of time-frequency atom, the DGT can be classified into two categories: the complex-valued discrete Gabor transform (CDGT) and the real-valued Discrete Gabor transform (RDGT) [5–8]. The former method for computing the DGT and its inverse transform all involves complex operators while the latter one can utilize discrete Hartley’s cas transform (DHT) kernel, discrete cosine transform (DCT) kernel, or discrete sine transform (DST) kernel as the Gabor basis function which only involves real operators. More specifically, in some real-time applications, the CDGT is more difficult to be implemented in hardware or software and the RDGT for sampled speech and image has an advantage of the computationally efficient implementation.

Over the past decades, the DGT has become a very valuable and widely used mathematic tool in diverse applications [12–19] such as audio processing, speech processing, image processing, sonar and radar signal processing, seismic signal processing, and transient signal processing. The analyzed signal, analysis window, and synthesis window in the periodic DGT usually have the same periodic length, which may confront difficulties in applying to some real-time applications of long-periodic signal sequences. To bridge these gaps, the long-periodic DGT [9, 10, 19] of complex-valued kernel and real-valued kernel has been presented to utilize the short window to analyze and process the long-periodic (or infinite) signal sequences in practical applications. Because existing canonical algorithms [11, 20–27] are mainly used in periodic/finite DGT and derived from Gabor frame theory, in this paper, a fast and effective algorithm, based on the orthogonal analysis approach and FFT algorithm, is proposed to obtain the analysis window for the long-periodic/infinite DGT in both the critical sampling case and the oversampling case.

The rest of the paper is organized as follows. In Section 2, the long-periodic/infinite DGT will be reviewed. In Section 3, a fast approach, which uses the new orthogonal constraint relationship of the analysis window and the synthesis window to deduce a series of independent linear equation sets, is introduced to calculate analysis window in the long-periodic/infinite DGT under both the critical sampling case and the oversampling case. In Section 4, the detailed comparison of computational complexity of related algorithms and numerical experiments have been given to show that the proposed method can overcome the existing algorithms in computing analysis window of the long-periodic/infinite DGT. Finally, the paper is concluded with Section 5.

#### 2. DGT for Long-Period and Infinite Sequences

Let represent a periodic and discrete-time signal with length and the length of analysis window and synthesis window . In order to use and to analyze and process the signal , the three periodic sequences ,, and of length should be constructed as follows:where The DGT for long-periodic/infinite sequences [4, 19] is defined by the following:and the Gabor coefficients can be calculated bywhere is the imaginary unit. The DGT for long-periodic/infinite sequences can be obtained by (5) corresponding to its expansion in (4). In (4) and (5), , let the positive integers , are the sampling points in time and frequency, and let and denote a modulation step in frequency and a translation interval in time. For a numerically stable reconstruction, the constrained condition by (or ) has to be satisfied. By choosing proper parameters and , the Gabor oversampling rate is a positive integer. The biorthogonal relationship [4, 19] of and , which are derived from the completeness condition between (4) and (5), can be rewritten aswhere denotes the discrete form of delta function, , and .

#### 3. FFT-Based Method for Solving the Analysis Sequences

To derive a new type biorthogonality relationship from the completeness between (4) and (5), substituting (5) into (4) yieldsrecallingand putting (8) into (7) leads toAccording to the completeness of the transform, the following constraint relationship has to be satisfied:soEquation (11) can be expressed as a equivalent form in the following:where and . Let , , and ; then (12) can be written as

Sours: https://www.hindawi.com/journals/complexity/2018/9039240/

## The Gabor Transform and Time-Frequency Signal Analysis

Wavelet Transforms and Their Applications pp 257-306 | Cite as

### Abstract

Signals are, in general, nonstationary. A complete representation of nonstationary signals requires frequency analysis that is local in time, resulting in the time-frequency analysis of signals. The Fourier transform analysis has long been recognized as the great tool for the study of stationary signals and processes where the properties are statistically invariant over time. However, it cannot be used for the frequency analysis thai is local in time. In recent years, several useful methods have been developed for the time-frequency signal analysis. They include the Gabor transform, the Zak transform, and the wavelet transform.

### Keywords

Orthonormal Basis Window Function Separable Hilbert Space Tight Frame Dual Frame

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

This is a preview of subscription content, log in to check access.

### Authors and Affiliations

1. 1.Department of MathematicsUniversity of Texas—Pan AmericanEdinburgUSA

## Gabor transform

The Gabor transform, named after Dennis Gabor, is a special case of the short-time Fourier transform. It is used to determine the sinusoidalfrequency and phase content of local sections of a signal as it changes over time. The function to be transformed is first multiplied by a Gaussian function, which can be regarded as a window function, and the resulting function is then transformed with a Fourier transform to derive the time-frequency analysis. The window function means that the signal near the time being analyzed will have higher weight. The Gabor transform of a signal x(t) is defined by this formula:  Magnitude of Gaussian function.

The Gaussian function has infinite range and it is impractical for implementation. However, a level of significance can be chosen (for instance 0.00001) for the distribution of the Gaussian function. Outside these limits of integration ( ) the Gaussian function is small enough to be ignored. Thus the Gabor transform can be satisfactorily approximated as This simplification makes the Gabor transform practical and realizable.

The window function width can also be varied to optimize the time-frequency resolution tradeoff for a particular application by replacing the with for some chosen .

### Inverse Gabor transform

The Gabor transform is invertible; the original signal can be recovered by the following equation ### Properties of the Gabor transform

The Gabor transform has many properties like those of the Fourier transform. These properties are listed in the following tables.

SignalGabor transformRemarks  1  Linearity property
2  Shifting property
3  Modulation property
Remarks
1 Power integration property
2 Energy sum property
3 Power decay property
4 Recovery property

### Application and example Time/frequency distribution.

The main application of the Gabor transform is used in time–frequency analysis. Take the following equation as an example. The input signal has 1 Hz frequency component when t ≤ 0 and has 2 Hz frequency component when t > 0 But if the total bandwidth available is 5 Hz, other frequency bands except x(t) are wasted. Through time–frequency analysis by applying the Gabor transform, the available bandwidth can be known and those frequency bands can be used for other applications and bandwidth is saved. The right side picture shows the input signal x(t) and the output of the Gabor transform. As was our expectation, the frequency distribution can be separated into two parts. One is t ≤ 0 and the other is t > 0. The white part is the frequency band occupied by x(t) and the black part is not used. Note that for each point in time there is both a negative (upper white part) and a positive (lower white part) frequency component.

### Discrete Gabor-transformation

A discrete version of Gabor representation with can be derived easily by discretizing the Gabor-basis-function in these equations. Hereby the continuous parameter t is replaced by the discrete time k. Furthermore the now finite summation limit in Gabor representation has to be considered. In this way, the sampled signal y(k) is split into M time frames of length N. According to , the factor Ω for critical sampling is .

Similar to the DFT (discrete Fourier transformation) a frequency domain split into N discrete partitions is obtained. An inverse transformation of these N spectral partitions then leads to N values y(k) for the time window, which consists of N sample values. For overall M time windows with N sample values, each signal y(k) contains K = N M sample values: (the discrete Gabor representation) with According to the equation above, the N M coefficients correspond to the number of sample values K of the signal.

For over-sampling is set to with N′ > N, which results in N′ > N summation coefficients in the second sum of the discrete Gabor representation. In this case, the number of obtained Gabor-coefficients would be M N′ > K. Hence, more coefficients than sample values are available and therefore a redundant representation would be achieved.

### Scaled Gabor transform

As in short time Fourier transform, the resolution in time and frequency domain can be adjusted by choosing different window function width. In Gabor transform cases, by adding variance , as following equation:

The scaled (normalized) Gaussian window denotes as: So the Scaled Gabor transform can be written as: With a large , the window function will be narrow, causing higher resolution in time domain but lower resolution in frequency domain. Similarly, a small will lead to a wide window, with higher resolution in frequency domain but lower resolution in time domain. ### References

1. ^E. Sejdić, I. Djurović, J. Jiang, “Time-frequency feature representation using energy concentration: An overview of recent advances,” Digital Signal Processing, vol. 19, no. 1, pp. 153-183, January 2009.
• D. Gabor, Theory of Communication, Part 1, J. Inst. of Elect. Eng. Part III, Radio and Communication, vol 93, p. 429 1946 (http://genesis.eecg.toronto.edu/gabor1946.pdf)
• Jian-Jiun Ding, Time frequency analysis and wavelet transform class note, the Department of Electrical Engineering, National Taiwan University, Taipei, Taiwan, 2007.
Sours: https://en.wikipedia.org/wiki/Gabor_transform

## Transform gabor

.

.

### Now discussing:

.

587 588 589 590 591