Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Fourier Transform | Image Processing with OpenCV
Computer Vision Essentials

Swipe um das Menü anzuzeigen

book
Fourier Transform

It allows us to transform an image from the spatial domain (where pixel values are represented directly) to the frequency domain (where we analyze patterns and structures based on their frequency). This is useful for tasks like image filtering, edge detection, and noise reduction.

First, we need to convert the image to grayscale:

To compute the 2D Fourier transform:

Here, fft2() converts the image from the spatial domain to the frequency domain, and fftshift() moves low-frequency components to the center.

To visualize the magnitude spectrum:

Since Fourier transform outputs complex numbers, we take the absolute values (np.abs()) for a meaningful visualization.

The np.log function enhances visibility, as raw magnitude values vary greatly in scale.

Aufgabe

Swipe to start coding

You are given an image:

  • Convert image to grayscale and store in gray_image variable;
  • Apply Fourier transform to the gray_image and stote in dft variable;
  • Make zero frequency shift to center and store the result in dft_shift variable;
  • Calculate a magnitude spectrum and store in magnitude_spectrum variable.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 2

Fragen Sie AI

expand
ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

book
Fourier Transform

It allows us to transform an image from the spatial domain (where pixel values are represented directly) to the frequency domain (where we analyze patterns and structures based on their frequency). This is useful for tasks like image filtering, edge detection, and noise reduction.

First, we need to convert the image to grayscale:

To compute the 2D Fourier transform:

Here, fft2() converts the image from the spatial domain to the frequency domain, and fftshift() moves low-frequency components to the center.

To visualize the magnitude spectrum:

Since Fourier transform outputs complex numbers, we take the absolute values (np.abs()) for a meaningful visualization.

The np.log function enhances visibility, as raw magnitude values vary greatly in scale.

Aufgabe

Swipe to start coding

You are given an image:

  • Convert image to grayscale and store in gray_image variable;
  • Apply Fourier transform to the gray_image and stote in dft variable;
  • Make zero frequency shift to center and store the result in dft_shift variable;
  • Calculate a magnitude spectrum and store in magnitude_spectrum variable.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 2
Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
Wir sind enttäuscht, dass etwas schief gelaufen ist. Was ist passiert?
some-alt