Earlier, I posted a small script that lets you do Fast Fourier Transforms in Javascript. I did this in to test the waters to see if I could do the exercises for the Numeric Photography study group in Javascript.
I am well underway, now, with the first exercise/assignment. The goal is to create an image editor that lets you work on either the image or the Fourier transform of the image. I have only tested it under Safari and Firefox so far. I do intend to add excanvas into it later and test it on some other browsers.
If you are interested (and have Safari or Firefox), here is the current state.
Edit (four hours later): I have now debugged it under Firefox 3.5.2.
These are the original image, the Fourier transform in which I painted some green dots and phase-rotated the lowest-order frequencies, and the image after the inverse transform.
What does the phase information look like?
I probably should show it. I will probably add that tomorrow.
Okay, so I couldn’t wait. It now displays the phase information as well. (Ugh.. I wish there were a comment-preview feature here… I hope you aren’t getting email on each edit to this reply.)
The following is the phase information after an inverse FFT, after some minor edits in paint mode to the FFT data.
FYI, it seems to work just fine in Chrome, too.
Why not use an example picture with stronger frequency component? They make for more sensible examples.
Excellent point. I find this image more interesting than my other test images, but its FFT is not so interesting. I have created a more interesting example.