Let's play a little rule game in here. Take this doodle sketch, you can do anything with it (redraw or whatever), but you need to share the process of making it in this comment section.
fft2 applies a 2D Fast Fourier transform to the image, which creates a complex (as in complex numbers) image. abs takes the magnitude of the complex image elementwise. log10 scales the result for display.
Then I downloaded the image from the MATLAB app, went into the Photos app and (badly) cropped out the white border.
Despite how dramatically different it looks, it actually contains the same [1] information as the original image. Said differently, you can actually go back to the original with the inverse functions, specifically by undoing the logarithm and applying the inverse FFT.
[1] Almost. (1). There will be border problems potentially caused by me sloppily cropping some pixels out of the image. (2). It looks like MATLAB resized the image when rendering the figure. However, if I actually saved the matrix (raw image) rather than the figure, then it would be the correct size. (3) (Thank you to @itslilith@lemmy.blahaj.zone for pointing this out.) You need the phase information to reconstruct the original signal, which I (intentionally) threw out (to get a real image) when I took the absolute value but then completely forgot about it.
don't you lose information by taking the abs(), since to restore the full information you need both complex and imaginary parts of the fft? You could probably get away with encoding Re and Im in different color channels tho
Another nice way one could preserve the complex data when visualizing it would be to make a 3d color mesh and display the imaginary components as the height in z and the real component as the color scale (or vice-versa).
Edit* now I am trying to think if there would be a clever way to show the abs, Re and Im values in one 3d plot, but drawing a blank. Maybe tie Im to the alpha value to make the transparency change as the imaginary component goes up and down? It would just require mapping the set of all numbers from -inf:inf to 0:1, which is doable in a 1-1 transformation iirc since they both have cardinality C. I think it would be
alpha = 1 - 1/(1-e^{Im(z)})
Which looks a lot like the equation for Bose-Einstein statistics in Stat. Mech. I was never very good at complex analysis or group theory though, so I don't really know what to make of that.
So I took your image and ruined my MATLAB account used the most normal part of your totally normal cow as a 3D [1] cockvolution convolution kernel. So in some sense, I dragged the red and purple part all across your image and added up the results. Here's the result:
[1] The original image was practically grayscale, so only a 2D convolution is required, i.e. over 2 spatial dimensions. Since you added color, it adds a extra dimension, one per color channel. Which makes it more annoying to work with in MATLAB. I mean, I could have just dumped everything into grayscale, but I need practice with processing color images anyways.