12.07.2015 Views

Lode's Computer Graphics Tutorial Fourier Transform

Lode's Computer Graphics Tutorial Fourier Transform

Lode's Computer Graphics Tutorial Fourier Transform

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ow shows the spectrum with a low pass filter applied to it: only the low frequency components remain.The bottom row shows the result of the Inverse FT on the new spectrum: all high frequencycomponents of the image are removed, and the image becomes blurred.Here's another example, which shows what happens if you set the imaginary part of the spectrum to 0.To get this, first press space and then press the b key in the program.More on different types of filters follows in the next sections.The DC ComponentThe center of the spectrum is the DC component of the picture, and represents the average color of thepicture: if you calculate the IDFT of a spectrum with only the DC component left, you get a flat imagewith only one color: the average of the original image. In the program for which the code was givenabove, first accept the image by pressing space, and then you can add or remove the DC component byusing the arrow keys, get the full spectrum again by pressing the a key (or the q key on azertykeyboards), and make the spectrum zero by pressing the m key (the , key on azerty keyboards). To getonly the DC component, first press m to remove the spectrum, then the up arrow to get only the DC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!