Skip to main content
Sandbox Physics

Optics 062 · Diffraction, Fourier optics, and computational imaging

Optical Fourier Processor

A coherent 4f processing bench with eight passive amplitude or phase filters, movable frequency masks, real inverted receiving data, phase contrast and matched correlation.

Interactive modelOptical Fourier Processor
Object-to-receiver distance / programmed filter radius 4f,aH4f,a_H0.500.50
Complete-field throughput / visible crop power T,PcropT,P_{\rm crop}50%50\%
Object sampling / frequency spacing Δx,Δν\Delta x,\Delta\nu0.00π0.00\pi
Model regimevalid model regime\text{valid model regime}

Physics tutorial

Audit the physics of Optical Fourier Processor

BackgroundA lens separates the spatial frequencies of a coherent amplitude field. At its back focal plane, physical position obeys XF=λfνxX_F=\lambda f\nu_x. A mask here edits the field spectrum, not the Fourier transform of a camera intensity image.

Why it mattersHow does moving one filter in a Fourier plane rewrite edges, blur, and repeated texture in an image?

Start with the essentials

Focus question
How does moving one filter in a Fourier plane rewrite edges, blur, and repeated texture in an image?
One-sentence intuition
Two positive lenses make two forward transforms. Thus Uout(x,y)=F−1{HU~in}(−x,−y)U_{\rm out}(x,y)=\mathcal F^{-1}\{H\widetilde U_{\rm in}\}(-x,-y). The minus coordinates matter: the receiving-plane image is inverted in both transverse directions.

Core mathematical model

Front and back focal planes

U~(νx,νy)=∬U(x,y)e−2πi(νxx+νyy) dx dyUF(X,Y)=e2ikfiλfU~(Xλf,Yλf)\begin{aligned}\widetilde U(\nu_x,\nu_y)&=\iint U(x,y)e^{-2\pi i(\nu_x x+\nu_y y)}\,\mathrm dx\,\mathrm dy\\U_F(X,Y)&=\frac{e^{2ikf}}{i\lambda f}\widetilde U\left(\frac X{\lambda f},\frac Y{\lambda f}\right)\end{aligned}

Object is one focal length before the first ideal lens. The filter is one focal length after it and one before the second lens. The receiver is one behind the second. Common carrier phase does not change intensity.

Passive masks and phase

Hlow=P 1∣ν−νc∣≤rνHhigh=P−HlowHphase=Pexp⁡(iϕH1∣ν−νc∣≤rν)P=1∣ν∣≤14 mm−1\begin{aligned}H_{\rm low}&=P\,\mathbf1_{|\boldsymbol\nu-\boldsymbol\nu_c|\le r_\nu}\\H_{\rm high}&=P-H_{\rm low}\\H_{\rm phase}&=P\exp\left(i\phi_H\mathbf1_{|\boldsymbol\nu-\boldsymbol\nu_c|\le r_\nu}\right)\\P&=\mathbf1_{|\boldsymbol\nu|\le14\,\mathrm{mm}^{-1}}\end{aligned}

Band passes radii between half radius and radius. Directional mode is a slit with that half-width. Twin notch blocks both signed centres. Phase disk is programmed at the chosen wavelength, not an unspecified glass depth. Carrier is a Fourier-plane stop; ideal lens pupils remain unlimited.

Power is separate from display brightness

T=∑∣U~H∣2∑∣U~∣2Iout=∣Uout∣2BI=min⁡(1,ln⁡(1+10eGI/Iinc)ln⁡5)\begin{aligned}T&=\frac{\sum|\widetilde U H|^2}{\sum|\widetilde U|^2}\\I_{\rm out}&=|U_{\rm out}|^2\\B_I&=\min\left(1,\frac{\ln(1+10^{e_G}I/I_{\rm inc})}{\ln5}\right)\end{aligned}

Parseval gives the same transmission from the complete sampled receiving field. The five-millimetre visible crop is not total power. Input, filtered and comparison images share one fixed display mapping; Fourier diagnostics use a separate fixed logarithmic mapping. All raw probes remain linear.

Phase becomes contrast, not new energy

Uweak≃1+iφH(0)=iUcontrast≃i+iφIcontrast≃1+2φ\begin{aligned}U_{\rm weak}&\simeq1+i\varphi\\H(0)&=i\\U_{\rm contrast}&\simeq i+i\varphi\\I_{\rm contrast}&\simeq1+2\varphi\end{aligned}

This illustrative weak-phase relation assumes a uniform background and a disk affecting only the zero order. The numerical model uses the actual finite illumination and finite disk, so halos and background leakage remain; it does not substitute this linear formula for the simulated image.

Passive matched correlation

Hmatch=PG~∗max⁡∣G~∣Ucorr(x,y)∝∬U(ξ,η)G∗(ξ+x,η+y) dξ dη\begin{aligned}H_{\rm match}&=P\frac{\widetilde G^*}{\max|\widetilde G|}\\U_{\rm corr}(x,y)&\propto\iint U(\xi,\eta)G^*(\xi+x,\eta+y)\,\mathrm d\xi\,\mathrm d\eta\end{aligned}

A smooth open-ring glyph is the programmed template. The same FFT data and passive normalized complex transmission calculate the correlation. Two repeated glyphs create peaks at inverted displacements. The disk gives a broad false response that can be brighter: an unnormalized positive-template correlation is not a classifier. This is an ideal complex mask, not a manufactured hologram or certified recognition system.

Sampling and physical scale

Lnum=16 mm,N=512Δx=Lnum/NΔν=1/LnumaH=λfrν\begin{aligned}L_{\rm num}&=16\,\mathrm{mm},\quad N=512\\\Delta x&=L_{\rm num}/N\\\Delta\nu&=1/L_{\rm num}\\a_H&=\lambda f r_\nu\end{aligned}

Input illumination tapers to zero at the four-millimetre square boundary. Zero padding reduces circular wraparound but the discrete output remains periodic; hard masks are sensitive to frequency-grid placement. Samples are point intensity, not area-integrated camera pixels. Changing wavelength or focal length reprograms the mask to keep frequency coordinates fixed, so its physical dimensions change. Apparatus axial scale and transverse detail scales differ.

Common difficulties

An intensity photograph does not contain the entire optical field

Typical misconceptionFourier-transforming the input photograph reproduces the optical processing of any object.

Better mental modelThe lens acts on complex amplitude. A transparent phase object can have nearly uniform input intensity while a phase disk reveals its structure. This simulation knows the programmed complex transmission; it does not recover lost phase from a photograph.

Run the experiment

  1. 01

    Scene 1: Blur versus edges

    Compare open carrier, low pass and high pass on the target. The image inverts; high pass loses most power while emphasizing edges.

    What to observe: Low pass softens fine detail; removing the central spectrum makes edges brighter relative to the background, not an energy gain.
  2. 02

    Scene 2: Erase the stripe pair

    In the stripe preset, click the paired spectrum peaks. Translate or widen the twin notch; stripe removal also discards overlapping object information.

    What to observe: A horizontal Fourier slit passes horizontal frequency variations, hence vertical object stripes. Rotating the slit rotates the selected frequency direction.
  3. 03

    Scene 3: Invisible phase becomes contrast

    Compare phase cells with an open carrier and a quarter-wave disk. Reverse disk phase, then try matched correlation on the two glyphs.

    What to observe: Phase filtering preserves power within the carrier; local brightness redistributes. Correlation peaks mark inverted displacements, not recovered object pixels.
FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy