1 / 44

Automation

Fourier Transforms, Filtering and Convolution. Automation. Mike Marsh National Center for Macromolecular Imaging Baylor College of Medicine. Single-Particle Reconstructions and Visualization EMAN Tutorial and Workshop March 14, 2007. Image. Fourier Transform.

sorena
Download Presentation

Automation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fourier Transforms, Filtering and Convolution Automation Mike Marsh National Center for Macromolecular Imaging Baylor College of Medicine Single-Particle Reconstructions and Visualization EMAN Tutorial and Workshop March 14, 2007

  2. Image Fourier Transform Fourier Transform is an invertible operator FT v2 will display image or its transform

  3. Image Fourier Transform Ny ⁄ 2 Ny y Nx ⁄ 2 0 Nx x {f(x,y)} = F(kx,ky) {F(kx,ky)} = f(x,y)} Fourier Transform is an invertible operator f(x,y) F(kx,ky)

  4. f(x) = F(s) Euler’s Formula Continuous Fourier Transform

  5. Image Domain Forward Transform f(x,y,z) g(x) F Fourier Domain Reciprocal space Fourier Space K-space Frequency Space Reverse Transform, Inverse Transform F(kx,ky,kz) G(s) F Some Conventions

  6. Math Review - Periodic Functions If there is some a, for a function f(x), such that f(x) = f(x + na) then function is periodic with the period a a 2a 3a 0

  7. Amplitude Phase f(x) = cos (x) f(x) = 5 cos (x) f(x) = 5 cos (x + 3.14) Math Review - Attributes of cosine wave

  8. Amplitude Phase Frequency f(x) = 5 cos (x) f(x) = 5 cos (x + 3.14) f(x) = 5 cos (3 x + 3.14) Math Review - Attributes of cosine wave

  9. f(x) = cos (x) Amplitude, Frequency, Phase Math Review - Attributes of cosine wave f(x) = A cos (kx + )

  10. Math Review - Complex numbers • Real numbers: 1 -5.2  • Complex numbers 4.2 + 3.7i 9.4447 – 6.7i -5.2 (-5.2 + 0i)

  11. Complex numbers 4.2 + 3.7i 9.4447 – 6.7i -5.2 (-5.2 + 0i) General Form Z = a + bi Re(Z) = a Im(Z) = b Amplitude A = | Z | = √(a2 + b2) Phase  =  Z = tan-1(b/a) Math Review - Complex numbers

  12. b  a Math Review – Complex Numbers • Polar Coordinate Z = a + bi • Amplitude A = √(a2 + b2) • Phase  = tan-1(b/a)  A 

  13. Math Review – Complex Numbers and Cosine Waves • Cosine wave has three properties • Frequency • Amplitude • Phase • Complex number has two properties • Amplitude • Wave • Complex numbers to represent cosine waves at varying frequency • Frequency 1: Z1 = 5 +2i • Frequency 2: Z2 = -3 + 4i • Frequency 3: Z3 = 1.3 – 1.6i

  14. Fourier Analysis Decompose f(x) into a series of cosine waves that when summed reconstruct f(x)

  15. Fourier Analysis in 1D. Audio signals Amplitude Only 5 10 15 (Hz) 5 10 15 (Hz)

  16. Fourier Analysis in 1D. Audio signals 5 10 15 (Hz) Your ear performs fourier analysis.

  17. Fourier Analysis in 1D. Spectrum Analyzer. iTunes performs fourier analysis.

  18. Fourier Synthesis Summing cosine waves reconstructs the original function

  19. Periodic Boxcar Fourier Synthesis of Boxcar Function Boxcar function Can this function be reproduced with cosine waves?

  20. k=1. One cycle per period A1·cos(2kx + 1) k=1 1  Ak·cos(2kx + k) k=1

  21. k=2. Two cycles per period A2·cos(2kx + 2) k=2 2  Ak·cos(2kx + k) k=1

  22. k=3. Three cycles per period A3·cos(2kx + 3) k=3 3  Ak·cos(2kx + k) k=1

  23. Fourier Synthesis. N Cycles A3·cos(2kx + 3) k=3 N  Ak·cos(2kx + k) k=1

  24. An image is two dimensional data. Intensities as a function of x,y White pixels represent the highest intensities. Greyscale image of iris 128x128 pixels Fourier Synthesis of a 2D Function

  25. Fourier Synthesis of a 2D Function F(2,3)

  26. Fourier Filters • Change the image by changing which frequencies of cosine waves go into the image • Represented by 1D spectral profile • 2D Profile is rotationally symmetrized 1D profile

  27. Low frequency terms • Close to origin in Fourier Space • Changes with great spatial extent (like ice gradient), or particle size • High frequency terms • Closer to edge in Fourier Space • Necessary to represent edges or high-resolution features

  28. Frequency-based Filters • Low-pass Filter (blurs) • Restricts data to low-frequency components • High-pass Filter (sharpens) • Restricts data to high-frequency-componenets • Band-pass Filter • Restrict data to a band of frequencies • Band-stop Filter • Suppress a certain band of frequencies

  29. Cutoff Low-pass Filter Image is blurred Sharp features are lost Ringing artifacts

  30. Flat in the pass-band Zero in the stop-band No ringing Butterworth Low-pass Filter

  31. Gaussian Low-pass Filter

  32. Note the loss of solid densities Butterworth High-pass Filter

  33. bandpass How the filter looks in 2D unprocessed lowpass highpass

  34. LowPass Filters filtered=image.process(‘filter.lowpass.guass’, {‘sigma’:0.10}) filtered=image.process(‘filter.lowpass.butterworth’, {‘low_cutoff_frequency’:0.10, ‘high_cutoff_frequency’:0.35}) filtered=image.process(‘filter.lowpass.tanh’, {‘cutoff_frequency’:0.10, ‘falloff’:0.2}) HighPass Filters filtered=image.process(‘filter.highpass.guass’, {‘sigma’:0.10}) filtered=image.process(‘filter.highpass.butterworth’, {‘low_cutoff_frequency’:0.10, ‘high_cutoff_frequency’:0.35}) filtered=image.process(‘filter.highpass.tanh’, {‘cutoff_frequency’:0.10, ‘falloff’:0.2}) BandPass Filters filtered=image.process(‘filter.bandpass.guass’, {‘center’:0.2,‘sigma’:0.10}) filtered=image.process(‘filter.bandpass.butterworth’, {‘low_cutoff_frequency’:0.10, ‘high_cutoff_frequency’:0.35}) filtered=image.process(‘filter.bandpass.tanh’, {‘cutoff_frequency’:0.10, ‘falloff’:0.2}) Filtering with EMAN2

  35. Convolution Convolution of some function f(x) with some kernel g(x) Continuous Discrete * =

  36. Convolution in 2D x x x  = x x x x x x x x x x x x x  =

  37. Microscope Point-Spread-Function is Convolution

  38. Convolution Theorem f  g = {FG} f = FG G Convolution in image domain Is equivalent to multiplication in fourier domain

  39. Power spectrum PS = Incoherant average of transform obs(x) = f(x)  psf(x)  env(x) + n(x) observed image noise f(x) for true particle envelope function point-spread function Contrast Theory F2(s) CTF2(s) Env2(s) + N2(s)

  40. Lowpass Filtering by Convolution f  g = {FG} • Camera shake • Crystallographic B-factor

  41. Fourier Transform is invertible operator Math Review Periodic functions Amplitude, Phase and Frequency Complex number Amplitude and Phase Fourier Analysis (Forward Transform)Decomposition of periodic signal into cosine waves Fourier Synthesis (Inverse Transform)Summation of cosine waves into multi-frequency waveform Fourier Transforms in 1D, 2D, 3D, ND Image Analysis Image (real-valued) Transform (complex-valued, amplitude plot) Fourier Filters Low-pass High-pass Band-pass Band-stop Convolution Theorem Deconvolute by Division in Fourier Space All Fourier Filters can be expressed as real-space Convolution Kernels Lens does Foureir transforms Diffraction Microscopy Review

  42. Further Reading • Wikipedia • Mathworld • The Fourier Transform and its Applications. Ronald Bracewell

  43. Lens Performs Fourier Transform

  44. 5 waves 25 waves 125 waves Gibbs Ringing

More Related