Zebrapard phase swap

Which matters more for recognizable structure: Fourier magnitude or phase?

QR code for this demonstration
\(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\}\)
Starting local Python WebAssembly…

Python

Pyodide + NumPy · runs locally

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 —