POV-Ray : Newsgroups : povray.off-topic : DFT and FFT : DFT and FFT Server Time
6 Sep 2024 09:18:08 EDT (-0400)
  DFT and FFT  
From: Mike Raiford
Date: 16 Jan 2009 14:51:27
Message: <4970e53f$1@news.povray.org>
So, in my quest of understanding I have decided to look closer at these 
magical functions. Everyone who's ever encountered an audio player 
probably knows what an FFT. Or has a vague abstract idea as to what it 
can be used for. because it's usually called something like FFT. or FFT 
filter. FFT spectrum. Whatever. I've seen the term floated around in 
such a cavalier manner.

OK, so it's the application of the FFT. Or rather the DFT, seeing as FFT 
is just an optimization of the DFT.

I have a very good handle now on what DFT actually does, and it's a 
pretty nifty transform. What I can't seem to wrap my head around is FFT. 
  But I think I'm getting there. I know it does a bizarre sort at the 
beginning, essentially ordering the data as if the indexes had their 
bits reversed, which allows the next step to happen. The values are then 
recombined, reversing the previous sorting process in such a way as to 
reveal the sine and cosine components of the source signal.

That part is really toasting my brain. I /almost/ understand the theory 
behind it, but there's some part that's blocking me. The amazing part is 
that it takes two nested loops of, say 256 values, and makes it 
essentially a 2-deep nesting of around 8 values with a rather small 
inner loop.

And its entirely reversible. (!)

The cool thing is you can take frequency domain set, multiply it by 
another frequency domain set, invert the DFT, and boom, you just 
filtered your data. No messy convolution.

As an example, you can achieve a blur effect on an image by using 
multiply operations on the image's frequency domain data. rather than 
create a convolution matrix to do the same thing.

I'm not 100 % on the theory of noise reduction, but my basic 
understanding is it basically analyzes a constant signal area of the 
image in the frequency domain, then subtracts that spectrum from the 
noisy signal, thereby cleaning the image, and only minimally harming the 
actual image. Thats my guess, at least. I know most of the popular NR 
algorithms out there work in the frequency domain...

Anyway, I'm rambling :)






-- 
~Mike


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.