Cookie Consent by Free Privacy Policy Generator 📌 Fast Fourier Transforms for Microstructural Analysis

🏠 Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeiträge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden Überblick über die wichtigsten Aspekte der IT-Sicherheit in einer sich ständig verändernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch übersetzen, erst Englisch auswählen dann wieder Deutsch!

Google Android Playstore Download Button für Team IT Security



📚 Fast Fourier Transforms for Microstructural Analysis


💡 Newskategorie: AI Nachrichten
🔗 Quelle: towardsdatascience.com

Unraveling microstructural features by FFT

Photo by Matthew Henry on Unsplash

Background

All energies in this universe have particle-wave dual characteristics. Fourier series and Fourier transform are widely used mathematical operations that decompose wave signals from different energies to extract valuable data. While solving a problem on heat conduction, French mathematician Joseph Fourier analyzed the sinusoidal components of heat waves, which led to the development of the Fourier series and Fourier analysis.

Although these mathematical operations mostly find usage in processing electromagnetic radiations such as radio, audio and electrical signals, they are also extensively applied in image processing to gather information. Signals generated from electromagnetic radiations are time-dependent, while that from images are space-dependent.

Here I will discuss why and how the Fourier transform is instrumental in interpreting images. And being a materials scientist, I will specifically highlight this tool’s strength in materials characterization.

I will begin with a brief overview of the Fourier series and the Fourier transform for ease of understanding this post.

A short introduction to the Fourier series, Fourier transform and Fast Fourier transform (FFT)

A Fourier series is a sum that represents a periodic function as a sum of sine and cosine waves. Here is the equation describing the series.

Image by author: Fourier series

A periodic function repeats at regular intervals called time periods. For instance, the below function f(x) repeats itself at a regular interval of 2π:

f(x) = sin(x)

Frequency is the inverse of a period.

The Fourier transform operation transforms a signal in the time domain into the frequency domain or spatial domain into the spatial frequency domain (also known as reciprocal space) and is represented by the below equations.

F(k ) is a function of frequency k; j is the imaginary number √-1. The above equations represent continuous Fourier transforms since the frequency and time (or spatial coordinates) variables are continuous-valued, varying from -∞ to +∞. In addition, we can also apply the transform operator over discrete points/samples, and the operation is called Discrete Fourier Transform (DFT). DFT transforms the continuous integral (Eq. 2) into a discrete sum:

Evaluation of the sum over N points or samples involves computational complexity proportional to O(N²) where O represents the order of complexity. Cooley and Tukey in 1965 implemented the divide-and-conquer algorithm (O(NlogN)) to accelerate the evaluation of the sum (Eq. 3). Cooley-Tukey algorithm is the first implementation of FFT. Frigo and Johnson at MIT further developed the FFT algorithm and created FFTW (Fastest Fourier Transform in the West) which is widely used worldwide. (Note: pyFFTW is the pythonic wrapper around FFTW).

Let us now understand how we can use FFT to analyze digital images.

Relevance of FFT in Digital Images

A digital image is composed of basic units called pixels, and each pixel is assigned a particular value of intensity varying between 0 and 255. The spatial domain of an image contains information on pixel intensity and pixel coordinates in real space.

Now let’s generate an image, as shown below, from a 2D periodic function f(x,y) = sin(2πx +3πy) using NumPy.

Image by author: 2D image generated from periodic function: f(x,y) = sin(2πx +3πy)

The corresponding 3D representation of the image beautifully captures the wave characteristics, thereby justifying the Fourier transform operations on images. Thus, processing the image signals by Fourier transform can unearth hidden but essential data for scientists and engineers.

Image by author: 3D representation of the above image displaying wave nature

Click here to learn about generating images from functions in Python.

FFT for Microstructure processing

In materials science, micrographs are the images of interest to explore and excavate data that will eventually impact a material’s performance.

Let me now demonstrate an image (micrograph) processing to retrieve precise edges of microstructural features using a Fourier filter. I have considered a defocussed image (shown below) displaying roundish particles whose edges cannot be identified accurately.

Image by author: Defocussed micrograph

I have used the FFT library of NumPy to write codes for image processing. (You can use pyFFTW and compare the relative execution times. When does pyFFTW beat numpy.fft?)

Here, I am writing the major steps involved when you apply FFT to the image above:

‣ I used imread to convert the jpg file of the image to a matrix (A ) whose elements store the information about each pixel (its coordinates and intensity).

Transformation from real space to Fourier space: I apply np.fft.fft2 function to the image matrix A to transform it from real (spatial) to frequency domain followed by shifting back the off-centered zero frequency components to the center. The code output looks like this 👇:

Code output: Image in reciprocal space after shifting the zero frequency components to the center

Masked image: Since the edges of particles correspond to high frequency, a mask, allowing only such frequencies to pass through, is applied to the transformed image obtained from the previous step. This helps in highlighting the edges.

Final Filtered image: Finally, we need to get back to the real space from spatial frequency space by deploying np.fft.ifft2 function to the masked image. I have shared below the processed image with distinct edges of the particles. One can easily measure the size of particles with defined boundaries.

Filtered Image in real space

A comparison with other image processing filters

For a comparative study, I have applied two other image filters — Canny and unsharp masking filters on the above micrograph.

As seen clearly (displayed below), the Fourier filter outperforms the Canny and unsharp masking filters to identify the edges of the particles for precise measurement. The Fourier filter gets an advantage due to its ability to deconvolute a signal accurately in terms of its amplitude, frequency, orientation and phase.

Code output-Processed image: Comparison among three image filters

Click here to view the entire code.

Key takeaways

✓ The Fourier series can be applied only to periodic functions, while the Fourier transform tool operates on non-periodic functions too.

✓ Images are mostly non-periodic. However, Fourier transform is widely used in image processing with the assumption of periodicity by considering a discrete span of signals representing the image. This concept laid the foundation for DFT. DFT is numerically implemented using FFT algorithms.

✓ FFT converts a wave signal from the time domain to the frequency domain or real space to reciprocal (spatial frequency) space.

✓ In image processing, the pixel information in real space is transformed into pixel information in the reciprocal (spatial frequency) space.

✓ Fourier filters can precisely detect features in micrographs both qualitatively and quantitatively.

For further details, please visit my website.

Thank you for reading!


Fast Fourier Transforms for Microstructural Analysis was originally published in Towards Data Science on Medium, where people are continuing the conversation by highlighting and responding to this story.

...



📌 Fast Fourier Transforms for Microstructural Analysis


📈 101 Punkte

📌 Distributed Fast Fourier Transform in TensorFlow


📈 33.44 Punkte

📌 Algorithmic Alchemy with The Fast Fourier Transform


📈 33.44 Punkte

📌 ImageMagick 7.0.8-50 Q16 MagickCore/fourier.c ComplexImage memory corruption


📈 27.11 Punkte

📌 ImageMagick 7.0.8-50 Q16 MagickCore/fourier.c ComplexImages memory corruption


📈 27.11 Punkte

📌 ImageMagick 7.0.8-50 Q16 MagickCore/fourier.c ComplexImages memory corruption


📈 27.11 Punkte

📌 Using Fourier Transform of Vector Representations Derived from BERT Embeddings for Semantic…


📈 27.11 Punkte

📌 Learn Discrete Fourier Transform (DFT)


📈 27.11 Punkte

📌 NEW FOURIER INTELLIGENCE'S GR-1 HUMANOID AI ROBOT UPDATE | TECH NEWS


📈 27.11 Punkte

📌 Assorted Flavors of Fourier Series on a Finite Domain


📈 27.11 Punkte

📌 Farsight DNSDB Transforms for Maltego offer accurate threat intelligence and fast response to threats


📈 26.31 Punkte

📌 Apple Patent Shows Accessory That Transforms An iPhone or iPad into a MacBook


📈 19.98 Punkte

📌 Optimus multi-prime is the new rule as OpenSSL transforms crypto policies again


📈 19.98 Punkte

📌 Incorrect transforms when stripping subdomains - chromium


📈 19.98 Punkte

📌 Beagle - An Incident Response And Digital Forensics Tool Which Transforms Security Logs And Data Into Graphs


📈 19.98 Punkte

📌 PwndLocker Transforms Into ProLock Ransomware Barring Free Decryption Tools


📈 19.98 Punkte

📌 LidarPhone Attack Transforms Smart Vacuum Cleaners Into Spying Tools


📈 19.98 Punkte

📌 She transforms IT: Kampagne für mehr Frauen in der Digitalisierung


📈 19.98 Punkte

📌 Nvidia's GeForce Now Windows App Transforms Your Cheap Laptop Into a Gaming PC


📈 19.98 Punkte

📌 St. Luke’s transforms clinical collaboration with Microsoft 365 cloud-connected workplace


📈 19.98 Punkte

📌 St. Luke’s transforms clinical collaboration with Microsoft 365 cloud-connected workplace


📈 19.98 Punkte

📌 PepsiCo transforms for the digital era


📈 19.98 Punkte

📌 This discreet dock transforms my laptop into a fully-featured desktop PC


📈 19.98 Punkte

📌 Journey Beyond transforms its contact center to deliver better customer journeys


📈 19.98 Punkte

📌 2022 Review: Trend Transforms to SaaS Cybersecurity


📈 19.98 Punkte

📌 Perform batch transforms with Amazon SageMaker Jumpstart Text2Text Generation large language models


📈 19.98 Punkte

📌 ENISA Transforms to European Union Agency for Cybersecurity


📈 19.98 Punkte

📌 Researchers Develop System That Transforms CO2 Into Concrete


📈 19.98 Punkte

📌 AlphaFold transforms biology for millions around the world


📈 19.98 Punkte

📌 NexDock transforms iPhone 15 into clamshell notebook


📈 19.98 Punkte

📌 Samsung introduces feature that transforms Galaxy phones into laptop webcams


📈 19.98 Punkte

📌 A new way of working transforms Foodstuffs South Island’s digital services


📈 19.98 Punkte

📌 NCWIT digitally transforms the DEI journey to help uplift women in IT


📈 19.98 Punkte

📌 GEOBOX: Raspberry Pi Transforms Into A Tool For Fraud And Anonymization


📈 19.98 Punkte











matomo