Feature Measurement

Menu Measure Features offsers several functions for the measurement of specific shapes or features in topographical images.

Curvature

Data ProcessMeasure FeaturesCurvature

The global surface curvature parameters are calculated by fitting a quadratic polynomial and finding its main axes. Positive signs of the curvature radii correspond to a concave (cup-like) surface, whereas negative signs to convex (cap-like) surface, mixed signs mean a saddle-like surface.

Beside the parameter table, it is possible to set the line selection on the data to the fitted quadratic surface axes and/or directly read profiles along them. The zero of the abscissa is placed to the intersection of the axes.

Similarly to the background subtraction functions, if a mask is present on the data the module offers to include or exclude the data under mask.

Curvature dialog screenshot showing the strong deflection of a glass plate with a thin film with compressive internal stress.

Fit Shape

Data ProcessMeasure FeaturesFit Shape

Form removal as well as measurement of geometrical parameters can be performed by fitting geometrical shapes on the data using the least-squares method. The Fit Shape module is essentially the same for images and XYZ data and it is described in detail in the XYZ data processing part. Only the differences are mentioned here.

Standard masking is supported for images. That is if a mask is present the dialog offers to use the data under the mask, exclude the data under mask or ignore the mask and use the entire data. Since the excluded pixels can be outliers or image parts not conforming to the chosen shape it it possible to avoid them also in the difference image by disabling Calculate differences for excluded pixels.

Facet Analysis

Data ProcessMeasure FeaturesFacet Analysis

Facet analysis enables to interactively study orientations of facets occurring in the data and mark facets of specific orientations on the image. The top left view displays data with preview of marked facets. The smaller bottom left view, called facet view below, displays the two-dimensional slope distribution.

Facet analysis screenshot, showing two selected points on the angular distribution and marked facets for one of them.

The centre of facet view always correspond to zero inclination (horizontal facets), slope in x-direction increases towards left and right border and slope in y-direction increases towards top and bottom borders. The exact coordinate system is a bit complex (an area preserving transformation between spherical angles and the planar facet view is used) and it adapts to the range of slopes in the particular data displayed. The range of inclinations is displayed below the facet view.

Points selected on the facet view, i.e. directions in space, are listed in the top right corner as both angles and unit vector components. You can also choose the direction of the selected point by clicking on the image view. The direction is then set to the local facet at that position in the image.

Standard controls allowing manipulation with the entire list or the selected point are below the list. Button Refine tries to improve the position of selected point to a local maximum in the facet view. Button Mark creates a mask on the image corresponding to the selected direction and a range of close directions. The directions are simultaneously shown on the facet view. The mean normal of the selected region is displayed as Mean normal below.

The bottom right part contains tabs with settings and some advanced operations.

Facet

Facet plane size controls the size (radius) of plane locally fitted in each point to determine the local inclination. The special value 0 stands for no plane fitting, the local inclination is determined from symmetric x and y derivatives in each point. The choice of neighbourhood size is crucial for meaningful results: it must be smaller than the features one is interested in to avoid their smoothing, on the other hand it has to be large enough to suppress noise present in the image.

Tolerance determines the range of directions for marking. It also determines the search range for refining the the selected direction.

Rotation

The set of selected directions can be rotated in space using either the shader control or by changing individual angles. The rotation angle around the vertical axis is denoted α and it is applied first. The directions are then rotated by angle ϑ in the direction given by azimuth φ .

The global rotation cannot be mixed with movement of individual points on the facet view. Once you start changing points there, the global rotation is reset and the current positions, whatever they are, become the initial positions. During rotation you can reset it to the starting state using the Reset button.

Lattice

A set of directions corresponding to low-number Miller indices can be created by choosing the lattice type, its parameters and pressing button Create points. The absolute lengths of the cell edges are not important for the directions, only their ratios are. Therefore, they can be given in arbitrary units.

Together with rotation, this function can be useful for matching the image facets to crystallographic planes.

Illustration of the influence of fitted plane size on the distribution of a scan of a delaminated DLC surface with considerable fine noise. One can see the distribution is completely obscured by the noise at small plane sizes. The neighbourhood sizes are: (a) 0, (b) 2, (c) 4, (d) 7. The angle and false color mappings are full-scale for each particular image, i.e. they vary among them.

Facet Measurement

Data ProcessMeasure FeaturesFacet Measurement

Facet measurement allows to interactively select and mark several facets of specific orientations on the image, measure their positions and store the results in a table. The top left view displays data with preview of marked facets. The smaller bottom left view, called facet view below, displays the two-dimensional slope distribution.

The centre of facet view always correspond to zero inclination (horizontal facets), slope in x-direction increases towards left and right border and slope in y-direction increases towards top and bottom borders. The exact coordinate system is a bit complex (an area preserving transformation between spherical angles and the planar facet view is used) and it adapts to the range of slopes in the particular data displayed. The range of inclinations is displayed below the facet view.

Facet plane size controls the size (radius) of plane locally fitted in each point to determine the local inclination. The special value 0 stands for no plane fitting, the local inclination is determined from symmetric x and y derivatives in each point. The choice of neighbourhood size is crucial for meaningful results: it must be smaller than the features one is interested in to avoid their smoothing, on the other hand it has to be large enough to suppress noise present in the image.

Tolerance determines the range of directions for marking. It also determines the search range for refining the the selected direction.

The currently selected point in facet view (facet orientation) is displayed as Selected ϑ and φ . Button Refine tries to improve the position of selected point to a local maximum in the facet view. Button Mark creates a mask on the image corresponding to the selected direction and a range of close directions. Once you are satisfied with the facet selection press Measure to add a measurement to the table below. Each row of the table contains

  • Point index n.
  • Number of pixels marked and used for the measurement.
  • Tolerance t used in the measurement.
  • Mean polar angle ϑ of the facet normal.
  • Mean azimuthal angle φ of the facet normal.
  • Facet normal as a unit vector (x, y, z)
  • Standard deviation of facet normals within the marked set δ.

The mean normals are calculated by simple averaging of the unit normal vectors n, which is appropriate when their spread is relatively small. The standard deviation is calculated in radians as follows

where bar denotes the mean normal.

Lattice

Data ProcessMeasure FeaturesLattice

Parameters of regular two-dimensional structures can be obtained by analysing data transformed into a form that captures their regularity. The ACF and PSDF are particularly well-suited for this because they exhibit peaks corresponding to the Bravais lattice vectors for the periodic pattern.

Peaks in the two-dimensional ACF correspond to lattice vectors in the direct space (and their integer multiples and linear combinations). Peaks in the two-dimensional PSDF correspond to lattice vectors of the inverse lattice. The matrices formed by the lattice vectors in direct and frequency space are transposed inverses of each other. With a suitable transformation either can be used to measure the lattice.

The Gwyddion function Measure Lattice can utilise either ACF or PSDF for the measurement. Since regular lattices with large periods correspond to peaks in the ACF image that are far apart but peaks in the PSDF that are close, it is preferable to use the ACF in this case to improve the resolution. Conversely, the PSDF image is more suitable if the lattice periods are small. In the dialogue you can switch freely between direct and frequency space representations and the selected lattice is transformed as necessary.

If scan lines contain lots of high-frequency noise the horizontal ACF (middle row in the ACF image) can be also quite noisy. In such case it is better to interpolate it from the surrounding rows by enabling the option Interpolate horizontal ACF.

The button Estimate attempts to find automatically the lattice for the image. When it does not select the vectors as you would like you can adjust the vectors in the image manually. The selection can be done either in a manner similar to Affine Distortion (this corresponds to choosing Show lattice as Lattice), or only the two vectors can be shown and adjusted (Vectors). Either way, when you choose approximately the peak positions, pressing the Refine button adjusts the positions of the vectors to improve the match with the peaks. Button Reset can be used to restore the vectors to a sane initial state.

The lattice vectors are always displayed as direct-space vectors, with components, total lengths and directions. The angle shown as φ is the angle between the two vectors.

Terraces

Data ProcessMeasure FeaturesTerraces

Terrace measurement can be used either to measure steps between plateaus in terrace or amphitheatre-like structures, or calibration by measuring such structures with precisely known step heights – in particular atomic steps on silicon.

The image processing has several parts:

  1. edge detection using the Gaussian step filter,
  2. segmentation into terraces,
  3. fitting the image with polynomial background, allowing each terrace to be offset vertically differently,
  4. estimation of step height and integer levels of individual terraces, and
  5. fitting the image again, assuming given integer levels.

Some of them are optional. Furthermore, filtering and segmentation is interactive, whereas fitting is only run when button Fit is pressed. Intermediate results can be visualised by choosing the image to display using the Display menu. At the beginning, the most useful image is usually Marked terraces which shows individual recognised terraces in different colours.

Parameter Step detection kernel of edge detection is the same as for the Gaussian step filter. The following parameters control segmentation:

Step detection threshold

Threshold for the edge-detection (as a percentage of maximum value of the filtered image). Too small threshold leads to fragmented terraces as too much of the image is considered edges. Too high threshold leads to merging of terraces which are actually at diffent heights – this is often best checked using the Marked terraces image.

Step broadening

Regions recognised as edges are widened by given number of pixels. This helps with separation of terraces which should stay separate. In addition, it excludes regions too close to edges from polynomial fitting.

Minimum terrace area

After segmentation, only sufficiently large terraces are kept. This option specifies the minimum terrace area, given as a fraction of the entire image area.

Segmentation can be augmented – or replaced – by a user-supplied mask. If the image has a mask, the standard masking options are offered. Here Exclude masked region means excluding it from the detected terraces. This allowing prevention of unwanted terrace merging – for instance by drawing manually small pieces of the boundaries using Mask Editor tool.

If option Do not segment, use only mask is enabled, no filtering is done and the mask is directly used as marked terraces (or their edges, depending on the masking mode). Filtering of terraces by area is still applied.

The total degree of the two-dimensional polynomial to fit is determined by parameter Polynomial degree. The polynomial is constructed in the same manner as in Polynomial levelling with limited total degree, except for the different base heights of each terrace.

The subsequent processing depends on whether Independents heights is enabled. If terrace heights are independent, each detected terrace is allowed to have arbitrary height offset. The module does not attempt to estimate one common step height. This is generally not useful with monoatomic steps which should be all of the same height, but can be useful for other types of terrace-like structures.

When heights are not independent, the module estimates the common step height and assigns an integer level to each terrace – this means the height of any terrace differs from any other by an integer multiple of the step height. Using this inital estimate, the polynomial fitting is performed again, leading to the final value of the step height.

Terrace measurement dialog screenshot showing marked terraces for an amphitheatre structure formed by atomic steps on silicon.

The lower part of tab Parameters shows an overview of the fitting results:

  • Fitted step height, usually the main result, shown with error obtained from the least-squares method,
  • Mean square difference between the data and fit (including only terraces, not edges),
  • Terrace discrepancy, the mean square difference between actual average terrace height and its height as a multiple of step height, and
  • Number of terraces found, marked and used for the fitting.

Tab Terraces contains a table detailing properties of individual terraces. Each row corresponds to one terrace. The columns are:

  • n, terrace index (and colour in Marked terraces image),
  • h, average height – actual, not multiple of step height,
  • k, integer level (multiple of step height),
  • Apx, area in pixels,
  • Δ, discrepancy, i.e. difference between average height and the assigned multiple of step height, and
  • r, residuum, mean square difference between fit and data.

For relatively noisy data, discrepancies can be better indicators of correct fit than fit residua.