Plane Correction and Flattening

Plane correction is one of the most important aspects of SPM image correction. SPM instruments often have a non-linear coupling between the lateral plane and the Z-axis causing unwanted bow in the image. The process for plane correcting the surface image is also called "flattening". Image flattening can be a challenging process, especially when the surface structure contains steps most flattening algorithms will fail because they can not distinguish the real structure from the plane distortions. However, SPIP has dedicated tools for detecting and handling steps such that the individual steps will appear flat.

 

The Plane Correction Dialog offers three main modes, which are selected from the top of the dialog:

images\planecorrectionshort.gif

 

Quality Optimized: When selected the plane correction settings will be set such that the best possible result is achieved. This mode requires no pre-knowledge about the different plane correction techniques and can be used by the novel as well as the advanced user. This mode will combine a number of techniques that detect and handle steps such that they do not introduce flattening errors.

Speed Optimized: When selected the plane correction settings will be such that low processing time has a high priority.

Custom: This mode is mainly for advanced users and offers access to all the detailed plane correction settings.

 

When working in the Quality and Speed optimized modes you may find it most convenient to have the dialog collapsed such that the dialog requires minimum space. Note that these modes work together with the AOI tool and the color bar markers. This means that a volume of interest can be limited and only the pixels within the volume will influence how the correction plane is calculated, see also Estimation Volume below.

 

Line-wise correction The collapsed dialog will have a single checkbox where you can define if you want to correct for line wise distortions. Line-wise distortions are typical scanning artifact occurring because the probing tip may change or pick up some contamination. When the dialog is expanded you can define in more detail how the line wise correction should be performed.

 

To access all the detailed settings click the More >> button. The plane correction methods are grouped into three groups: Global Correction, Line-wise Correction and Z-Offset Method. In addition an Estimation Volume can be defined and interactive tilt performed.

 

images\planecorrectionmenu.gif

 

It is possible to select between four different plane correction algorithms that subtract a fitted image to the global image:

Polynomial Fit, Average Profile Fit, Sphere Fit and Max Flatness Tilt.

 

Polynomial Fit: Slope corrects the image based on a Least Mean Square fit to the entire image or the volume defined by the Estimation Volume group box. To the image z(x,y) a plane zp(x,y) is fitted by a polynomial function of the form:

images\ebx_-1115179750.gif

The coefficient ai and bi for the polynomial function is then found by minimizing the Square Sum Error:

 

images\ebx_238829911.gif

 

The corrected image z'(x,y) is then calculated by subtracting the fitted plane:

 

images\ebx_-868765286.gif

The computation time for estimating the plane parameters can for some applications be inconvenient especially for images containing a large number of pixels. In those cases the number of operations can be reduced by letting the plane fit be based on the average x and y profiles. An average x profile is found by adding all individual x profiles into a single curve and the average y profile is found similarly:

 

images\ebx_-1718902563.gif images\ebx_-1985857496.gif

 

From the x and y profiles the two sets of, a and b, coefficients is determined within a very short computation time.

 

Polynomial degrees for the two Least Mean Square fit methods can be set between 0 and 5. Degrees greater than 3 are seldom recommended because the fit might then start to match the real surface structure more than the undesired plane error.

 

Sphere Fit. This will subtract an estimated sphere form.

 

Max Flatness Tilt

Enabling Max Flatness Tilt will automatically tilt the image so that the height distribution histogram will maximize the frequency a dominating height level. When SPIP detects two dominating height levels, it will maximize the sum of those two frequencies. This function has it advantage when dealing with single steps where the polynomial fit functions may fail because they will fit functions to the step rather than undesired image bow.

 

When setting the Global Correction method to None no automated Global correction methods will be performed even when "Apply When Loading" is checked.

 

Apply (Global Correction)

Press the Apply button in the Global Correction group box to apply the global correction method

 

Small surface corrugations can sometimes be dominated by the noise in the scanner system. Typically, this creates observable steps between subsequent scan lines. Likewise, temporary contamination of the probe will cause the scan lines to be leveled differently.

In such cases the image can be corrected by leveling the individual scan lines to more probable levels. SPIP offers two methods that can be combined with the polynomial plane correction.

 

The LMS Fit method subtracts a fitted polynomial function from each individual scan line with at polynomial degree defined by the Degree numerical text field.

The improvement may be astonishing. However, there might be less information about corrugations perpendicular to the scan lines. Especially for roughness measurements, this may cause underestimated values.

To achieve the best results it will often be an advantage to combine this method with the Inside Color Range check box of the Estimation Volume set. When doing so it is possible to eliminate the influence of noise, particles and real surface corrugation and concentrate on the bow artifacts created by the scanner.

 

Histogram Alignment 

This correction technique elevates the individual x-profiles so that their height distribution obtains the best match. The result will be reflected immediately in the height distribution histogram for the image, which will show the dominating height values as sharper peaks.

For structures where the average value of the profiles may vary, for example, waffle patterns for height calibration references this technique is particularly valuable.

The method is especially powerful in connection with Z-calibration.

 

The line-wise settings can be applied independently from the other settings using the dedicated Apply button.

 

Correct Selected Cross-section

This function is ideal for interactive elimination of local scan line distortions.

To correct a single scan line or horizontal line piece create at horizontal cross-section and press the "Correct Selected Cross-section" button. You can also limit the part of the cross-section, which you want to correct by applying cursors in the profile window. When the cursors are shown only the line piece between the cursors will be corrected.

The correction will substitute the pixels on the cross-section line by the average value of their upper and lower neighboring pixels.

To correct more scan lines simultaneously you can apply Average Profiling and the averaging box will define the scan lines to be corrected, the new pixel values will then be found by interpolation.

The same method can be performed by right clicking in a profile window on Cursor Function->Correct data between cursors by neighboring scan lines

 

It is possible to limit the volume by which the fit to the image plane will be based. In this way it is possible to avoid the influence from extreme values or real surface structures not related to the scanner bow, which we want to remove. A very powerful option is to base the estimation on height values within a certain z-range defined by the color boundaries of the color bar, see Inside Color Range below

 

Entire Image: The slope correction will be based on the entire image area.

 

Inside Area of Interest, The slope correction is only based on the data within the marked Area. You can apply the Area of Interest Marking tools to define the area of interest by any shape.

 

Frame Region, The plane fit will be based only within the specified outer frame. This is particular useful when the center part of the image contains a dominating feature like, for example, an indentation that could cause are wrong estimation of the surface bearing plane.

 

Frame Width, The frame width can be set between 1 and 30% of the image width.

 

Inside Color Range, perform the estimation on the pixels having height values within the upper and lower color limits of the color bar. This enables a plane correction without influence from outliers or asymmetric distribution of e.g. pits or single steps. Below is seen how the color bar markers are used to define the Z-range, which will be used in the estimation of the plane structure; the white and black areas will be ignored.

 

images\planecorrectioninsidecolor.gif

 

As this option can be combined with the Estimation Area options described above it is possible to determine an estimation volume rather than just an estimation area or z-range.

It is highly recommended to use this option for accurate step height measurements.

 

Correct AOI Only, only the pixels inside the Area of Interest and pixels having values within the range defined by the Color bar markers will be corrected. The surrounding will be leveled by constant values so that no or only small edges will appear.

This setting is especially useful when correcting images containing steps and where the nature of the distortion on the individual steps is different. In such case you should use the color bar markers and the AOI tools to define and correct one step at a time.

Z Offset

The Plane Correction Dialog offers five ways of setting the Z Offset:

 

Set Mean To Zero

This will level the image so that the mean value of the image is set to zero.

 

Keep Mean

This will level the image so that the mean value of the original image is preserved after a plane correction.

 

Set Min To Zero

This will level the image so that the min value of the image is set to zero.

 

This will define the bearing height as the most dominant height value (based on a height distribution histogram) and level the image so that it is set to zero. The dominant height value is identical to the value in the height distribution histogram having the highest frequency.

 

You can also level image such that the minimum value is set at a specific value by checking the associated radio button and entering the desired min value.

The selected Z-Offset method can be applied independently from the other settings by clicking on the Apply button in the Z-Offset Method group box.

 

The plane of the image can be tilted manually by use of the arrows and the tilt step can be controlled by the Tilt Height number entered in nm. It is possible to monitor the effect on the histogram distribution and a profile simultaneously by having these windows open.

 

For images containing significant steps it is recommend setting the "Handle Steps" option on. In such case SPIP will combine a number of algoritms to detect and handle steps such that the flatness is optimized. This option is always applied when using the "Quality Priority" mode. A detailed description of the algorithms is a company secret and cannot be revealed. If it is important for you to document the algorithm used you should not use this option.

 

Show Difference

When this option is on the difference between the image before and after correction image is shown. This image is identical to the correction image and describes exactly how the image was corrected in the most recent correction.

 

Apply When Loading

When this check box is set the current settings will automatically be applied when opening a new image file in the following order:

·      Global Correction

·      Line-wise Correction

·      Z-Offset Correction

 

Save / Recall

You can save the actual settings into file such that they can be recalled again. When saving into the file called "Default.pln" you will define the default settings which will be loaded when restarting SPIP. Stored settings files can also be recalled from batch processes so that results from batch processes are independent from actual user modified settings.

 

Apply (All)

When clicking on the Apply button at the bottom of the dialog the selected slope correction methods will be applied on the Main Image. The result is immediately reflected in the profile curve and the histogram if open.

 

If you are using the Custom mode it can some times be necessary to process the image more times with different settings. In such case it is an advantage to monitor the histogram and a representative profile while adjusting the image plane. They are updated simultaneously with the image and you can easily see if the image is improving.

To avoid the influence from outliers, such as spikes, particles, pores and indentations you should apply the Inside Color Range option and the color bar markers in the image window to define a valid z-range for the estimation volume, such that the outliers will have little or no effect on the result. Likewise, you may apply the Inside Area of Interest option combined with the AOI tools to exclude outlier areas.

If you are having specific outliers in the image which you want to reduce you can use the outlier objects filter of the filter module or the following trick:

·      Mark the outlier area by AOI tools such that the exterior is defined as the Area of Interest.

·      Select the AOI Frame, right click on it and click "Define Outside AOI's as Void Pixels"

·      Right click in the image on "Void Pixels->Interpolate new values"

·      Right click in the image on "Void Pixels->Accept

While working with plane correction undesired results may occur, in which case you can take advantage of the undo function just by clicking Ctrl+Z. To learn more about the undo function, see the Undo section.