Skip to content

Sub-pixel Fourier registration for wafer metrology

I implemented phase correlation with matrix-multiply DFT upsampling in NumPy: 1/100-pixel shifts that match scikit-image exactly on 50 of 50 tests, benchmarked across four wafer patterns and 15–40 dB of noise.

Role
Implementation, verification and benchmarking
Setting
Synthetic benchmark with exact Fourier-domain shifts · not yet validated on real wafer images
Stack
  • NumPy
  • SciPy FFT
  • Phase correlation
  • scikit-image (cross-check)

Live demo · runs in your browser

Wafer pattern

Referenceclean design pattern
Targetshifted by (3.427, -5.184) px, 30 dB
Correlation peak, 1/100 px gridupsampled DFT
Residual after realigning|reference − target shifted back by the estimate|
Truth
(3.427, -5.184)
Estimate
…
Error
…
Compute, your browser
…

One shift is an anecdote. Run 50 random ones at the current pattern and noise.

Real
The registration runs live in your browser: a TypeScript port of the project's NumPy library, about 40 ms per 256×256 pair on a laptop.
Checked
Same estimate as the Python library on identical inputs for logic and DRAM patterns; within 0.09 px on patterns with spectral nulls, where FFT rounding decides (mean error within 1%).
Differs from the notebook
256×256 instead of 512×512 and a browser random generator, so batch numbers will not match the notebook tables exactly. Nothing is uploaded.

Key results

estimate grid

0.01 px

estimate grid

upsampling factor κ = 100

identical to scikit-image

50 / 50

identical to scikit-image

random shifts

per 512×512 pair

~24 ms

per 512×512 pair

median, CPU

01

Problem & constraints

Wafer inspection and overlay metrology compare images that differ by fractions of a pixel. A naive cross-correlation peak is quantised to whole pixels, and zero-padding the spectrum to refine it is expensive.

02

My contribution

Implementation, verification and benchmarking

  • Implemented phase correlation and Guizar-Sicairos matrix-multiply DFT refinement with NumPy and SciPy only.
  • Cross-checked against scikit-image's reference implementation.
  • Generated four synthetic wafer topologies with a noise and optics model, using exact Fourier-domain shifts.

03

Method & key decisions

Integer peak, then a local DFT

The normalised cross-power spectrum keeps only phase; its inverse is a sharp peak at the shift. Instead of zero-padding by κ, the inverse DFT is evaluated only on a 1.5κ × 1.5κ grid around the coarse peak as two matrix products: O(κN²) instead of O(κ²N² log κN).

Test shifts without interpolation

Benchmark targets are shifted exactly in the frequency domain; bilinear or bicubic warping would blur the image and bias the result.

Porting it exposed a weak spot

The browser port gives the same estimate as the NumPy library on every logic and DRAM case, but differs by up to 0.09 px on reticle and power patterns. The cause: those clean patterns have exact spectral nulls, where the cross-power spectrum is about 1e-14 and its phase is FFT rounding noise. Phase normalisation amplifies those bins to full weight. Dropping them in a follow-up experiment cut the error on every pattern, most on power/MEMS (2.3×).

04

Evaluation

Data
Four synthetic wafer patterns, Gaussian optical PSF σ = 1.2 px, Gaussian sensor noise
Protocol
Mean Euclidean error over 50 random shifts in ±8 px, fixed seed
Hardware
CPU
Mean registration error vs sensor noise
0.0000.0520.1030.1550.206152025303540SNR (dB)mean error (px)Power / MEMSOverlay reticleLogicDRAM array
Mean registration error vs sensor noise
SNR (dB)Power / MEMSOverlay reticleLogicDRAM array
150.19110.07740.05120.0333
200.1320.04520.03750.0235
250.07840.03310.02460.016
300.05780.02250.01720.0121
350.04040.01780.01290.0087
400.02560.01480.00990.0069

Fine periodic patterns carry strong high-frequency phase and register best; wide power/MEMS fingers are 3–6× less precise at the same noise.

Follow-up experiment: dropping spectral-null bins (mean error, px)
PatternLibraryNull bins droppedImprovement
Logic0.04300.03251.3×
DRAM array0.03850.02551.5×
Overlay reticle0.07760.04951.6×
Power / MEMS0.16650.07232.3×
256×256, 50 random shifts per pattern at each of 15, 25 and 40 dB, clean reference and noisy target (scripts/wafer_null_bins_experiment.py). Not yet in the library. With two noisy images the nulls fill with noise, so the real-world analogue is magnitude weighting.

05

Results

Synthetic DRAM array pattern
Open full-size image in a new tab
DRAM array: 0.0151 px mean error at 25 dB (512×512 benchmark).
Synthetic logic layer pattern
Open full-size image in a new tab
Logic layer: 0.0263 px.
Synthetic overlay reticle box-in-box pattern
Open full-size image in a new tab
Overlay reticle: 0.0347 px.
Synthetic power device pattern
Open full-size image in a new tab
Power / MEMS: 0.0856 px.

06

Failures, limits & next steps

Limitations

  • Best-case benchmark: pure circular translation, the model the method assumes.
  • The 0.01 px grid is a floor at κ = 100.

Next steps · what would prove it

  • Fold null-bin masking or magnitude weighting into the library and re-run the benchmark.
  • Hann apodisation before the FFT; a log-polar stage for rotation and scale.
  • Validation on real optical overlay images; a batched CUDA port.

07

Code & references

  • M. Guizar-Sicairos, S. T. Thurman, J. R. Fienup. Efficient subpixel image registration algorithms. Optics Letters 33(2), 2008.

Contact

Want to go deeper on this project? I'm happy to walk through it.

Open to full-time engineering roles. If the problem is hard and the data is messy, I'm interested.