Topic: One of the most immediate applications of the Fourier transform, is to monitor the frequency content of a signal, or more specifically video frames in this case. The frequency content mirrors the uniformity or changes of pixel values in each frame, and thus can create very characteristic patterns when an image has distinct uniform and non-uniform areas (for example a frame containing parallel lines).


Exercise: Create a Python script file and perform the following tasks:

  • Import the OpenCV, Numpy, Progressbar (optionally), and SKVideo libraries.
  • Open a video file and convert it to grayscale.
  • Obtain the frequency content of each frame using numpy’s numpy.fft package.
  • Display the frequency content alongside each original frame and save the results.

Instructions and Material for solution: Click Files to download the exercise material.

Expected results spectrum.

Lecture for better understanding:https://icarus.csd.auth.gr/image-transforms-lecture/

This exercise was developed by A. Christidis.

————————————————————————————————————–

For the solutions to the exercises, please contact koroniioanna@csd.auth.gr