**Any** image can be reconstructed from a series of sinusoidal gratings.
A sinusoidal grating looks like this…
/2
You can find the parameters of a sinusoidal grating by using the 2D #FourierTransform.
The dots shown contain the amplitude and phase of the grating. Their position from the centre gives the frequency, and their orientation represents the orientation of the grating.
/10
Now, if you have lots of gratings superimposed on each other, the #FourierTransform gives you a pair of dots for each of the components
/11
Now, here's the "magical" part of #Fourier theory.
*Any* image is made up of lots of sinusoidal gratings. So, the 2D Fourier Transform of an image gives you thousands of pairs of dots, and each pair represent a sinusoidal grating.
/12
There's a lot more than can fit in a single thread.
If you want to read more detail, and go through the step-by-step writing of the code to decompose & recostruct *any* image, read full article here:
#coding #2dfourierimages #2dfouriertransform #fourier
/16
So, this thread could serve as my my #introduction
I'm Stephen. I used to be a physicist (as you can guess from the thread above) but now I focus on communicating about Python and programming and teaching coding
You can expect more varied content from me, all related to #programming in #Python, from science-y stuff like this, to fun animations using the `turtle` module (no not those boring ones!) and general Python for those learning to code at beginner and intermediate levels
@s_gruppetta In my 35 years as a sotfware engineer I have seen a lot of code that looks like it was written by seven year olds. 😆
@klyons I can imagine!