How to Draw Fourier Image Plane

Fourier Transform Optics

Digital paradigm processing lets us perform operations such as background subtraction, dissonance reduction, dissimilarity enhancement, filtering, etc. on a digitized image, consisting of a rectangular assortment of numbers.  1 of the operations we can perform is Fourier transform filtering .

A digital image records light intensity every bit a part of position.  According to Fourier's theorem any reasonably continuous function defined over some altitude L can be synthesized past a sum of harmonic (sine and cosine) functions whose wavelengths are integral submultiples of L, (such every bit L/two, L/iii, ...). Allow f(x) be such a periodic role.  Then we may write

f(x) = A0/2 + north=i Ancos(knorthwardx) + ∑n= 1 Bnsin(knx)

or f(x) = ∑- +∞ Cnexp(iknx),

where the coefficients A0, An, and Bnorth or Cnorthward can exist calculated efficiently using figurer algorithms. The thousandnorth = n2π/L are equal to 2π times "frequencies" of the component harmonic waves.  We really do not sum over infinitely many frequencies, but only over frequencies upwards to the sampling frequency.

Review of the mathematical properties of the Fourier series and the Fourier transform.

Link:  Making Waves  Click on "Run At present" to explore how to synthesize various functions using simply sine and cosine waves.  The amplitude versus frequency plot tells united states the amplitude (how much) of each sine and cosine function we have to apply to reproduce the chosen part.  This is called a plot of the function in the "frequency domain".

The Fourier transform of a two-dimensional image is a two-dimensional array of complex numbers giving the coefficients Cn.  It is an important image processing tool.  It represents the image in the frequency plane, i.due east. each point represents a particular frequency contained in the image plane.  We can now manipulate the transform in the frequency plane and detect how this affects the synthesized image in the image plane.  Image filtering, smoothing, and border enhancement are some of the effects we tin can accomplish by manipulation the Fourier transform.

Examine the simple image of a square and its Fourier transform beneath.

Prototype

Fourier transform

The eye of the Fourier transform plot represents the amplitudes of the low frequency sine and cosine waves that make up the image, while the outer regions represent the high frequency waves.

A low-laissez passer filter eliminates all the frequencies above a cutoff frequency.  If nosotros synthesize the image using only waves with low frequencies (long wavelengths), then sharp features are no longer resolved.  Nosotros have smoothed the prototype.

Applying a depression-pass filter to the Fourier transform

The resulting smoothed image

A high-pass filter eliminates all the frequencies below a cutoff frequency.  If nosotros synthesize the image using just waves with loftier frequencies (short wavelengths), then smoothen features of the image are largely eliminated and the sharp edges dominate.  We have border-enhanced the paradigm.

Applying a high-pass filter to the Fourier transform

The resulting edge-enhanced image

This interactive tutorial lets you manipulate the Fourier transform.  You lot can construct low-pass and high pass filters to smooth the image or produce border enhancement effects.

horizontal rule

Monochromatic optical images record low-cal-intensity variations.  The calorie-free intensity is proportional to the <Eastward2>, the time-averaged square of the electric field vector.

Example:

In one dimension, consider a function f(10) = |f(x)| exp(iφ(x)).  Presume that the intensity f(10) has been measured at N = 1024 evenly spaced points over a range from x = 0 to ten - x.24 mm.  The sampling "frequency" therefore is i/(0.01) mm = 100 mm-1.  The intensity I(x) = |f(x)|2 is plotted on the correct.

Allow the states find the discrete Fourier transform of this office using Microsoft Excel's FFT role.

The Fourier Assay tool is a part of the Analysis ToolPak.  Information technology can be used to analyzes periodic information by using the Fast Fourier Transform (FFT) method to transform the data.  This tool also supports changed transformations, in which the inverse of transformed data returns the original data.  The tool can be used to analyze one-dimensional data.  To access the tool click "Tools, Data Assay, Fourier Analysis" on Excel's toolbar.

How does information technology piece of work?

bullet Excel works with discrete data.  One can ascertain a Fourier transform for a discrete series of points called the discrete Fourier transform (DFT).  Excel has a build in Fast Fourier Transform (FFT) algorithm.  The FFT is simply a DFT that is faster to summate on a calculator.

Presume that we accept a periodic function with period L which we are sampling at N discrete points.

f(10northward) = ∑- +∞ C(kg)exp(ikone thousandxn)  ~  ∑ m=0 N-1C(kthou)exp(ik1000xn)
C(km)
= (1/Fifty)∫0 Lf(x)exp(-ikyardx)dx ~ (1/L) n=0 N-one f(tendue north)exp(-ikmxn)Δx.
Hither kthou = m2π/L and Δx = L/N.
Therefore
f(xn) =  ∑
m=0 N-oneC(yardm)exp(i2πmtendue north/L)
C(km)
= (1/N) n=0 Northward-one f(xnorth)exp(-i2πchiliadxdue north/L)

If nosotros choose our units then that L = 1 and xn = northward(L/North) = due north/Northward and chiliadm = m2π, then we can write

f(n) =  ∑ yard=0 N-aneC(m)exp(i2πmn/North)
C(m)
= (ane/North) north=0 Northward-one f(north)exp(-i2πmn/N)

0 ≤ n ≤  N-1,  0 ≤ yard ≤  N-1

[We have N (circuitous) equations and N (complex) unknowns, a arrangement that can be solved exactly.]

For N = 2n data, Excel's FFT and inverse FFT implement the relationships

f(n) = (i/Northward) m=0 Northward-oneC'(grand)exp(i2πmn/N)
C'(1000)
= northward=0 Northward-one f(north)exp(-i2πmn/N)
Note that if f(n) = real, then C'(m) = C'(N-m)*, since exp(-i2πmn/N) = exp(i2π(North-grand)due north/N).

If f(n) is real, we can rewrite the above equations in terms of a summation of sine and cosine functions with real coefficients.
f(north) = (1/N) m=0 Due north-i [a(m)cos(2πmn/North) + b(m)sin(2πmn/N)]
where a(m) = Re(C'(k)), b(chiliad) = -Im(C'(k)).

Rewriting nosotros have
f(northward) = (
1/Northward) 1000=0 North/2-1 [a(yard)cos(2πmn/North) + b(chiliad)sin(2πmn/Due north)] + (1/N)m=N/2 N-one [a(Due north-thousand)cos(2π(N-g)northward/N) + b(N-grand)sin(2π(N-yard)n/North)]
= (
1/Due north) thou=0 North/two-one [a(thousand)cos(2πmn/N) + b(m)sin(2πmn/N)] + (ane/N)m'=ane N/2 [a(one thousand')cos(2πm'due north/North) + b(m')sin(2πm'n/N)]
= (
ane/N) grand=0 North/2-ane [2a(thou)cos(2πmn/N) + 2b(m)sin(2πmn/Due north)] = (1/North) m=0 N/2-id(thousand)cos(2πmn/Due north + φm).
We have now take N real equations for North real unknowns, N/2 frequencies and Due north/2 phases.

The C(yard) are complex.  C(0) is the constant contribution and C(N/two) corresponds to the Nyquist frequency.  The Nyquist criterion states when sampling discrete data points at some sampling frequency, fdue south, one tin can obtain reliable frequency information only for frequencies less than fs/2.
[Once again, if we sample real values at N points, nosotros have N equations, which we can solve for N/2 frequencies and N/2 phases.]

[Presume you sample an object over a catamenia 50 and your sample contains feature with flow 50/two.  The frequency of this feature is fii = 2/L or ktwo = 2*2π/50.
To be able to recognize this feature you need a minimum sampling frequency of f4 = 4/L or k4 = 2*2π/50, i.e.  yous demand at least 4 information signal.

With only 2 evenly spaced data points, information technology is impossible to recognize features that have a frequency fii.

With 4 evenly spaced data points, it is possible to recognize features that have a frequency f2, except for sure phase differences between sample and feature.]

The C(thou > N/two) correspond to negative frequencies and for a existent sequence x, they are circuitous conjugates of the C(k < Northward/2).  The magnitude plot of C(k) versus k is perfectly symmetrical well-nigh the Nyquist frequency.  The useful information in the signal is establish in the range 0 to fs/ii.

The input range for the Excel Fourier Analysis tool can be a range of real or circuitous data.  Complex data must be in either x+yi or x+yj format.  If 10 is a negative number, precede information technology with an apostrophe ( ' ).  The number of input range values must be an even power of 2.  The maximum number of values is 4096.

For the analysis of periodic information the input range should hold one period of the information.  For the analysis of not-periodic data which become to zero at �∞, the information to be analyzed should be restricted to a fraction of the input range and the rest of the input range should be nothing.  In this approximation the input range represents all space, (i.e.  space is restricted to a box), and the information occupy a fraction of space.

Let the input range incorporate Due north values labeled by x(0) to x(N - one).  After calculating the Fourier transform of the input range the output range volition incorporate N values.  The absolute values of the entries x(1) to ten((N/2) - 1) will exist mirrored by the absolute values of the entries x((N/two) + 1)) to x(N - 1).  But the entries are complex numbers and, in general, the phases will non be mirrored.

If we use this output range as the input range for an changed FFT, the output range of this "inverse transform" will contain the original data.

horizontal rule

For our example the range of x-values is L = x.24 mm.  The range of k-values Excel will include is thou = (2π/L)m = (2π/(x.24 mm))one thousand, where thousand is an integer ranging from 0 to 1023.

The linked Excel spreadsheet FFT1.xlsm contains columns for the function f(x), its Fourier transform FFT, and the changed Fourier transform inv FFT.  The intensity is represented by "f(x)^2", the square of the Fourier transform is represented by "FFT^2", and the intensity of the changed is represented by "inv FFT^2".  The spreadsheet also contains a column called "mask".  In this cavalcade nosotros can dispense 1 mm in the middle of the x.24 mm office f(10) without having to page down to the heart of the f(x) column.  The changes we make in the "mask" column are automatically copied to the heart of the object column.

The graphs above shows f(x)^2 and FFT^ii.  We tin can now manipulate the Fourier transform and notice how this affects the inverse transform.

To alter the office f(x), manipulate the mask.  To summate the Fourier transform of the new blueprint, click the FFT button.  To calculate the inverse Fourier transform, click the inv. FFT button.  To dispense the inverse transform, use filters and masks in the transform cavalcade.  For example, to employ depression-pass filter, set everything except the fundamental pinnacle in the transform cavalcade equal to nil.   (Click the LP Filter button.)  To employ high-laissez passer filter, set the central region in the transform column equal to cipher.   (Click the HP Filter push.)

[For the spreadsheet to work the "Add-Ins" Analysis ToolPak and Analysis ToolPak-VBA have to be installed and checked.  The spreadsheet contains macros for the FFT and the inverse FFT.  If macros are enabled, you can just click the appropriate button to calculate the FFT and the changed FFT.  If the macros practise not run on your computer, click Tools, Macro, Visual Basic Editor.  In the editor cheque that funcres.xla, procdb.xla, and atpvbaen.xla are loaded.  Click Tools, Preferences, and scan for the missing files on your hard deejay.  Yous should observe them in a directory with a proper noun similar C:\Program Files\Microsoft Office\Office10\Library\Analysis.]

A low- pass filter applied to our function will yield the results shown beneath.

smithnottakeling.blogspot.com

Source: http://electron9.phys.utk.edu/optics421/modules/m6/transform-optics.htm

0 Response to "How to Draw Fourier Image Plane"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel