Installation - - Getting Started - - Saving Data
Level - -
Detect - -
FineAlign - -
Localize
Area Analysis - - Keyboard Shortcuts
Simulation AFM - - YouTube Video Tutorials
Image Levelling

Manual Leveling
Plane Leveling:
To remove tilt or bow in images:
- Set the x and y Plane values to perform polynomial fitting to all the x and/or y values in each image.
- Plane fitting is previewed in real-time.
- Press the ‘Accept’ button to apply.
- Tip: X and Y values of 1 will remove linear tilt, values of 2 or more can remove image bow.
Line Leveling:
To remove height variations between scan lines:
- Set the x and y Line values to perform polynomial fitting to each image line in x and/or y.
- Line fitting is previewed in real-time.
- Press the ‘Accept’ button to apply.
- Tip: use ‘-Med’ to remove the median of each line in x.
Line or Plane Leveling with a Mask:
To level images and movies that contain a variety of height levels requires certain regions (referred to as masked regions) to be excluded from the polynomial fits. Typically the included region should be a surface which is expected to be level and has a high coverage (>50%).
The options to generate a mask are:
1) Using the upper and lower threshold values on the height histogram
2) Manually drawing using the Draw Mask button
3) Using the ‘Mask with z-scale’ to mask values outside of the colormap scale
4) Automatically using the Otsu method
5) Automatically using the Fit button (fits a Gaussian to all the values in the movie and using 1.5σ (standard deviation) as the threshold values.)
plane-line
- Steps:
- Subtracts a best-fit plane (x and y directions).
- Applies a median line subtraction in x.
multi-plane-edges
- Purpose: Edge-based masking for step detection -> useful if there are multiple flat surfaces
- Steps:
- Plane subtraction.
- Median line if vertical variation dominates.
- Edge detection masking → used to apply weighted plane and line leveling multiple times.
- Final mean-plane subtraction.
multi-plane-otsu
- Purpose: Uses Otsu method to generate edge masks for multi plane fitting -> useful if there are multiple flat surfaces
- Steps:
- Plane subtraction.
- Median line subtraction if vertical variance exceeds threshold.
- Otsu edge masks applied iteratively for plane/line subtraction.
- Final mean-plane subtraction.
iterative 1nm high
, iterative -1nm low
, iterative high low
- Purpose: Removes features above/below a fixed height.
- Steps:
- Plane subtraction.
- Line subtraction if vertical variance dominates.
- Iteratively thresholds using fixed z-limits and reapplies plane and median line subtraction with masking.
Line1 + Otsu Line2
- Steps:
- Subtracts a linear line fit (first pass).
- Applies Otsu thresholding to mask and subtracts a stronger 2nd order line fit.
high-low x2 (fit)
- Purpose: Uses Gaussian fitting on the histogram to determine leveling thresholds.
- Steps:
- Initial plane + median line subtraction.
- Histogram of z-values fitted with Gaussian.
- Mask generated for values within ±1.5σ.
- Leveling reapplied with mask.
iterative fit holes
, iterative fit peaks
- Purpose:
- Holes: For images with lower-intensity defects.
- Peaks: For images with higher protrusions.
- Steps:
- 2nd-order plane fit + median line subtraction.
- Gaussian fit on z-values → ±1.5σ mask (shifted for holes or peaks).
- Repeat leveling with mask.
- Generate new mask and repeat.
-
Final 1st-order line subtraction with mask.
Choosing the Right Routine
- Flat surfaces with sparse particles →
iterative 1nm high
or high-low x2 (fit)
- Surfaces with pits/defects →
iterative fit holes
- Surfaces with sharp peaks →
iterative fit peaks
- Samples with more than 1 plane →
multi-plane-edges
or multi-plane-otsu
- General leveling →
plane-line
or Line1 + Otsu Line2
YouTube video on Leveling + Area Analysis
