Here's a very silly baby possum that tried to climb up a tree when it saw me coming: https://gallery.brainonfire.net/v2/image/14802
The tree was only like 4 feet tall so this was... not a good strategy?
If I just blast the bejeezus out of the saturation and contrast on that last FFT, the first image shows the result. Note the concentric rings of red and cyan around the origin—that's probably the fire extinguishers! The orangey cast farther out is probably due to the bricks and the weird red haze over the upper left of the input image.
For comparison, the second image is when I took the FFT of the full-resolution image, *then* downscaled that. Notice how it appears to be zoomed out? That's because there's a broader range of frequencies to represent in a larger image. (It was also about 7x larger in file size, ~15 MB, which is why I downscaled it before uploading.) Now there's a greenish cast to the high frequency areas, and I don't know why!
Here's a weird photo from NYC of a giant crowd of fire extinguishers behind a hotel.
There are a *ton* of geometric patterns in this image, so it's great for FFT. (Not just the extinguishers—we got bricks, fence, pipes, etc. It's also different in X and Y directions.)
Did I mention I've got color working now? (Version 098feaac.) I run the FFT on each RGB channel separately and then recompose. It's not very colorful is it, though? Well, no reason it should be! Most of the FFT output is high-frequency stuff like sensor noise. Those big color blocks in the input are probably represented in a relatively small number of low-frequency pixels in the output.
(Note: This FFT is on a scaled-down version of the image.)
Here's a bowl of silica gel beads and a heavily post-processed amplitude plot. The plot has been cropped and had the levels globally adjusted to highlight a hexagon around the origin. I think the hexagon represents the spherical close-packing of the beads, even though that packing is fairly imperfect.
Oh, uh, I guess I should include a regular ol' amplitude plot of a photo. Here's one of that playground structure.
I can now plot phase, too! https://github.com/timmc/fimg/blob/30f0bb0a/fimg.py#L116
...which is mostly a speckly streaky mess, even harder to interpret than the amplitude plot. However, it does have some structure if you look at it in full 1:1 pixel view, so I decided to throw the *phase plot* back in as a source image and extract an amplitude plot of *that*.
And... it appears to have, to some degree, reconstructed the source image!
(It's all quartered-up because the plot outputs are rolled by 1/2 along both axes.)
"Speckling" the amplitude (scaling every frequency's amplitude by a random number from 0 to 1) gives a an interestingly textured effect to the playground equipment photo.
I think this texturing echoes the lines in the source image.
Here's the result of throwing away frequency amplitude information, and just preserving phase. Specifically, I ran with `const_amp 10000` (it has a sort of CLI now!) to set the amplitudes all to an arbitrary 10k. This gives an image made mostly of graininess, I guess because high frequencies such as sensor noise are normally low-amplitude, and have been boosted here.
I've been playing around with taking Fourier transforms of images, screwing around in frequency-space, and doing the inverse transform. Here are some of the results.
The first one is a video where I just set all the phase information to a constant angle, sweeping through a full circle over the course of the video. Source and commands here: https://github.com/timmc/fimg/commit/2da3e37309eeee762adedbbb793678b9ba45bd08
In the second I largely preserve the phase information, but rotate the angle by 1/10 of a circle. Source: https://github.com/timmc/fimg/blob/c1231029/fimg.py#L59
OK, we can retire this meme now.
And I now acknowledge the Canadian government as my superior in memeing.
https://twitter.com/LibraryArchives/status/1196413178005114880
Alt of @varx -- less tech talk on this account, maybe.