Zebrapard phase swap
Which matters more for recognizable structure: Fourier magnitude or phase?
\(I_j(k,\ell)=\mathcal{F}\{i_j(x,y)\}=|I_j(k,\ell)|e^{i\phi_j(k,\ell)}\)
\(i_{12}(x,y)=\mathcal{F}^{-1}\!\left\{|I_1(k,\ell)|e^{i\angle I_2(k,\ell)}\right\}\)
\(i_{21}(x,y)=\mathcal{F}^{-1}\!\left\{|I_2(k,\ell)|e^{i\angle I_1(k,\ell)}\right\}\)
Before you run the code: Which result do you expect to look more like the zebra, and which more like the leopard? Why?
Image 1 · Zebra
Image 2 · Leopard
\(i_{12}\) · magnitude 1 + phase 2
\(i_{21}\) · magnitude 2 + phase 1
Zebra + Leopard · 384×384 grayscale
Compare your prediction: phase controls spatial structure; magnitude controls spectral strength.
—