Feature Tracking
| Author(s) | M. Bremer, V. Wichmann (c) 2012-2026 |
| Library ID | grid_analysis |
| Tool ID | 19 |
| Version | 1.2 |
| Menu | Grid | Analysis |
Description
The tool performs displacement analysis using image cross-correlation between two raster datasets. For each raster cell, a reference window and a search window are defined. The reference window extracts a template pattern, which is then matched within the larger search window. The algorithm identifies the correlation peak and uses its position to calculate the magnitude and direction of displacement.
Two correlation methods are available: local normalized cross-correlation (NCC) and an FFT-based NCC approach. The latter is ported from the original Fortran implementation of the IMCORR software developed by the National Snow and Ice Data Center.
The FFT-based method computes correlations for all possible displacements simultaneously in the frequency domain, making it computationally efficient, particularly for large search areas. However, because the normalization is not strictly evaluated for each local window, the result is an approximation of true NCC.
In contrast, the local NCC method evaluates the correlation independently for each candidate displacement using window-specific statistics (mean and variance). It supports different kernel shapes and optional Gaussian weighting to reduce edge effects within the matching window. Although this approach is computationally more expensive, it provides greater robustness to local intensity variations and typically yields higher accuracy.
The maximum displacement of a feature that can be measured is:
(search chip size/2 - reference chip size/2) * cell size
This maximum applies only to exactly diagonal motion. In order to measure larger distances, a known offset between reference and search window can be given. The offset specifies the x/y components of the expected movement. Besides a constant offset, spatially variable offsets can be applied when a point shapes layer with start positions and x- and y-displacements, e.g. from a previous tool run, is provided.
The tool can take two elevation models to query the elevations at the start and end points of the each detected movement to compute a 3D displacement vector.
The tool computes the following attributes (some of them are only available if elevation data is provided):
- ID: a unique identifier per measurement
- GX, GY: grid column and row indices of the source (start) cell
- REALX, REALY, REALZ: x,y,z world coordinates of the source (start) cell of the movement
- DISP: horizontal displacement distance [map units]
- DISP_REAL: 3D displacement distance [map units]
- STRENGTH: correlation strength of the Fourier analysis [-]
- FLAG: flag indicating a correlation was found [-]
- XDISP, YDISP, ZDISP: x,y,z components of the displacement [map units]
- XDISP_UNIT, YDISP_UNIT: x,y components of the displacement unit vector [0-1]
- XTARG, YTARG, ZTARG: x,y,z world coordinates of the target (stop) cell of the movement
- XERR, YERR: x,y error components of the correlation strength [-]
- ASPECT, SLOPE: compass direction and gradient of the displacement [degree]
- ID_M: identifier of the spatially variable measurement position (if specified)
Note: the tool requires that the input data does not contain any NoData cells.
References
Fahnestock, M. A., Scambos, T. A., and Bindschadler, R. A. (1992): Semi-automated ice velocity determination from satellite imagery. Eos, 73, 493.
Fey, C., Rutzinger, M., Wichmann, V., Prager, C., Bremer, M., and Zangerl, C. (2015): Deriving 3D displacement vectors from multi-temporal airborne laser scanning data for landslide activity analyses. GIScience & Remote Sensing, 52(4), 437-461. Link
Scambos, T. A., Dutkiewicz, M. J., Wilson, J. C., and Bindschadler, R. A. (1992): Application of image cross-correlation to the measurement of glacier velocity using satellite image data. Remote Sensing Environ., 42(3), 177-186. Link
Parameters
| | Name | Type | Identifier | Description | Constraints |
| Input | Grid 1 | grid, input | GRID_1 | The first grid to correlate. | - |
| Grid 2 | grid, input | GRID_2 | The second grid to correlate. | - |
| DTM 1 | grid, input, optional | DTM_1 | The DEM used to extract elevation information for grid 1. | - |
| DTM 2 | grid, input, optional | DTM_2 | The DEM used to extract elevation information for grid 2. | - |
| Displacement Offsets | shapes, input | SHP_OFFSET | A point shapes layer with start positions and pre-calculated displacement offsets. | - |
| Output | Correlated Points | shapes, output | CORRPOINTS | Point shapes layer of correlated positions with displacement and correlation information. | - |
| Displacement Vector | shapes, output | CORRLINES | Line shapes layer with displacement vectors between correlated points. | - |
| Options | Grid System | grid system | PARAMETERS_GRID_SYSTEM | - | - |
| Correlation Method | choice | CORR_METHOD | Choose the correlation method to use. | Available Choices:
[0] local NCC
[1] FFT-based NCC
Default: 0 |
| Search Chip Size | choice | SEARCH_CHIPSIZE | The size of the search chip (rectangular search area) used to find the correlating reference chip (pattern template) [cells]. | Available Choices:
[0] 32x32
[1] 64x64
[2] 128x128
[3] 256x256
Default: 1 |
| Reference Chip Size | choice | REF_CHIPSIZE | The size of the reference chip, i.e. the pattern template to find in search chip [cells]. | Available Choices:
[0] 16x16
[1] 32x32
[2] 64x64
[3] 128x128
Default: 1 |
| Kernel Type | choice | KERNEL_TYPE | The kernel's shape. | Available Choices:
[0] Square
[1] Circle
Default: 1 |
| Weighting | choice | WEIGHTING | The kernel weighting. | Available Choices:
[0] no weighting
[1] Gaussian weighting
Default: 1 |
| Stepping | integer number | STEPPING | The grid cell stepping used to move the search chip over the input grids [cells]. | Minimum: 1
Default: 2 |
| Offset Type | choice | OFFSET_TYPE | Determines whether no offset between reference and search chip is applied, a uniform offset is used, or the offset varies across the spatial extent. | Available Choices:
[0] no offset
[1] constant offset
[2] spatially variable offset
Default: 0 |
| X Displacement | floating point number | DISP_X | The expected displacement in the x-direction (positive = east) [map units]. | Default: 0.000000 |
| Y Displacement | floating point number | DISP_Y | The expected displacement in the y-direction (positive = north) [map units]. | Default: 0.000000 |
| X Displacement | table field | FIELD_DISP_X | The attribute specifying the expected displacement in the x-direction (positive = east) [map units]. | - |
| Y Displacement | table field | FIELD_DISP_Y | The attribute specifying the expected displacement in the y-direction (positive = north) [map units]. | - |
| ID | table field | FIELD_ID | The identifier of the measurement position. | - |
| Maximum Distance | floating point number | MAX_DIST | The maximum distance of a raster cell node to a pre-calculated start position [map units]. | Minimum: 0.000000
Default: 4.000000 |
Command Line
Usage: saga_cmd grid_analysis 19 [-GRID_1 ] [-GRID_2 ] [-DTM_1 ] [-DTM_2 ] [-CORRPOINTS ] [-CORRLINES ] [-CORR_METHOD ] [-SEARCH_CHIPSIZE ] [-REF_CHIPSIZE ] [-KERNEL_TYPE ] [-WEIGHTING ] [-STEPPING ] [-OFFSET_TYPE ] [-DISP_X ] [-DISP_Y ] [-SHP_OFFSET ] [-FIELD_DISP_X ] [-FIELD_DISP_Y ] [-FIELD_ID ] [-MAX_DIST ]
-GRID_1: Grid 1
grid, input
-GRID_2: Grid 2
grid, input
-DTM_1: DTM 1
grid, input, optional
-DTM_2: DTM 2
grid, input, optional
-CORRPOINTS: Correlated Points
shapes, output
-CORRLINES: Displacement Vector
shapes, output
-CORR_METHOD: Correlation Method
choice
Available Choices:
[0] local NCC
[1] FFT-based NCC
Default: 0
-SEARCH_CHIPSIZE: Search Chip Size
choice
Available Choices:
[0] 32x32
[1] 64x64
[2] 128x128
[3] 256x256
Default: 1
-REF_CHIPSIZE: Reference Chip Size
choice
Available Choices:
[0] 16x16
[1] 32x32
[2] 64x64
[3] 128x128
Default: 1
-KERNEL_TYPE: Kernel Type
choice
Available Choices:
[0] Square
[1] Circle
Default: 1
-WEIGHTING: Weighting
choice
Available Choices:
[0] no weighting
[1] Gaussian weighting
Default: 1
-STEPPING: Stepping
integer number
Minimum: 1
Default: 2
-OFFSET_TYPE: Offset Type
choice
Available Choices:
[0] no offset
[1] constant offset
[2] spatially variable offset
Default: 0
-DISP_X: X Displacement
floating point number
Default: 0.000000
-DISP_Y: Y Displacement
floating point number
Default: 0.000000
-SHP_OFFSET: Displacement Offsets
shapes, input
-FIELD_DISP_X: X Displacement
table field
-FIELD_DISP_Y: Y Displacement
table field
-FIELD_ID: ID
table field
-MAX_DIST: Maximum Distance
floating point number
Minimum: 0.000000
Default: 4.000000