Multi-focus panoramas generation

When imaging at high magnification (with high numerical aperture), the depth of focus is so shallow you can see the different layers of a chip.


I finally managed to make clean and large multi-focus panoramas so I’ll describe the problems and the solutions here.

What’s it all about?

A multi-focus panorama is a 3d panorama keeping the depth of focus information you can see under the microscope.

Here is an example of my first perfectly successful multi-focus panorama. This is an Atmel ATMEGA8 MCU using an Olympus Plan 100x/1.25 oil objective.


You can change the focus using the arrows.
Press mouse button left to zoom, drag to move.

The last image is using focus stacking using the previous layers.

This way of visualizing chips has several advantages:

  • Allows you to represent what you see under the microscope with greater fidelity.
  • Makes it easier to distinguish top metal for tracing.
  • Makes the layers underneath easier to read.

Focus precision

One of the most important requirements is the precision of the Z axis.
A very fine step is required to get a good consistency between layers.

For that you generally use the highest possible microstepping available, which requires smooth stepper drivers, like the TMC2208.

You also need a good leveling. The focus have to be consistent on a single tile or it will not work.

My previous attempt was good, but far from perfect.

MC68SEC000 Core

In many places you can see some small focus differences, it’s not perfectly consistent.

New stepper motor

What did changed between this one and the Atmega panorama?
I switched from a 1.8deg/step to 0.9deg/step stepper motor.

In addition to improvements in precision, the new motor is much quieter and induces less vibrations.

Probably one of the best hardware upgrades I’ve made recently.

Capture settings

To capture all layers, you need a very big stack.

In the current configuration, the microscope will focus to the sharpest layer so you can expect the focus to drift from top metal to any under layer.

For the Atmega8, 47 images are captured for each tile.
Giving a total of 82861 images, and 21h of capture.

This number was deduced by counting how many steps you need from the bottom layer to the top layer (23). You want to capture 23 layers before but also after the current focus position, which gives 47 frames.

Possible improvements

The current method is simple and effective but can be improved.

If you are able to deduce the current layer focused by the microscope, you can divide by 2 the number of required frames.

Stitching

Step 1: Coarse stitching

First we need a coarse stitch to visualize the chip.

This can be done with a rough focus stack using the frames on LoG peaks, or if the stage is precise enough just by aligning them into a grid.

Step 2: Level of detail

Next I convert the images to “LOD” (pyramid of different resolutions) for visualization.

Step 3: Focus adjustment

The tiles are imported in a custom software I made to visualize the panoramas, and with the ability to adjust manually the focus of each tile.

The focus of all tiles on the left and right borders are ajusted in such a way that top metal is in focus.

With the Atmega8 chip the task is easy because of the thick top metal traces arround the chip, and so we can use the max LoG value to select the right focus.

A few tiles have to be adjusted manually. Then for each scanline I interpolate the Z position with the known value of the border tiles.

At this point, I have a consistent focus for each tile.

Step 4: Building main layers

Using the previous result, extract the main layers but also neighbor focus points and use focus stacking to combine them.

This will ensures consistent and sharp layers.

Focus stack the generated layer to obtain a sharp final focus stacked image and stitch it. The tile are consistent and the stitching should be easier.

Note: we don’t focus stack all 47 images for two reasons:

  • It’s way slower.
  • The quality is not good and a lot of halo artifacts are present. Ideally we want to focus stack the sharpest images.

Now we can fuse all main layers and export the final multi-focus panorama.