GRASS logo

NAME

r.dem.icp - Co-register DEM surfaces using Iterative Closest Point (point-to-plane).
Aligns a source DEM to a reference DEM with robust, multi-scale ICP.

KEYWORDS

raster, registration, ICP, parallel

SYNOPSIS

r.dem.icp
r.dem.icp --help
r.dem.icp reference=name source=name output=name [mask=name] [dof=integer] [levels=integer] [stride=integer] [max_iterations=integer] [trim=float] [huber=float] [tolerance=float] [distance_max=float] [slope_max=float] [init_dx=float] [init_dy=float] [init_dz=float] [init_yaw=float] [init_roll=float] [init_pitch=float] [transform_out=name] [stats_out=name] [nprocs=integer] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

reference=name [required]
Reference DEM raster
source=name [required]
Source DEM raster to align
output=name [required]
Output aligned DEM raster
mask=name
Optional stable-terrain mask (non-zero=use)
dof=integer
Degrees of freedom (4: dx,dy,dz,yaw; 6: add roll,pitch - experimental)
Options: 4, 6
Default: 4
levels=integer
ICP pyramid levels (coarse to fine)
Default: 3
stride=integer
Base sampling stride (cells) at finest level
Default: 2
max_iterations=integer
Max iterations per level
Default: 30
trim=float
Trimmed ICP keep fraction [0-1]
Default: 0.80
huber=float
Huber delta (m); 0 disables
Default: 1.0
tolerance=float
Convergence threshold on parameter update norm
Default: 1e-5
distance_max=float
Max point-to-plane distance (m); 0 disables
Default: 10
slope_max=float
Reject target cells with slope > (deg)
Default: 90
init_dx=float
Initial dx (m)
Default: 0
init_dy=float
Initial dy (m)
Default: 0
init_dz=float
Initial dz (m)
Default: 0
init_yaw=float
Initial yaw (deg)
Default: 0
init_roll=float
Initial roll (deg) (6-DoF only)
Default: 0
init_pitch=float
Initial pitch (deg) (6-DoF only)
Default: 0
transform_out=name
Write final transform to file
stats_out=name
Write per-iteration stats to file
nprocs=integer
Number of threads for parallel computing
0: use OpenMP default; >0: use nprocs; <0: use MAX-nprocs
Default: 0

Table of contents

DESCRIPTION

r.dem.icp performs constrained-rigid (4-DoF) co-registration of two DEM rasters, with an experimental full 6-DoF mode, aligning a source DEM to a reference DEM with an Iterative Closest Point (ICP) solver. Key properties of the implementation:

NOTES

EXAMPLES

The commands below use the example scene built in the r.dem toolset manual, which is derived from the North Carolina sample dataset. Build it there first.

Align the misregistered surface with four degrees of freedom, which solves three translations and yaw:

g.region raster=elev_lid792_1m

r.dem.icp source=dsm_offset reference=elev_lid792_1m \
    mask=stable_terrain output=dsm_icp dof=4 \
    transform_out=icp_transform.txt stats_out=icp_stats.csv

The reported transform is the one that maps the source onto the reference, so its signs are opposite to those of r.dem.nk. Against an applied offset of 0.4596 m east, 0.4596 m north, and 1.32 m up it returns:

tx=-0.4590844708
ty=-0.4608043693
tz=-1.3201388046
yaw=0.0000935114
r.dem.icp example
Figure: Stable-terrain residual before and after r.dem.icp at dof=4.

REFERENCES

Related methods not implemented here: Nuth, C. and Kaeaeb, A. (2011), The Cryosphere 5:271-290 (aspect/slope vertical-bias coregistration, provided as r.dem.nk); Segal, A., Haehnel, D. and Thrun, S. (2009), Generalized-ICP, Robotics: Science and Systems.

SEE ALSO

r.dem, r.dem.coregister, r.dem.nk

AUTHORS

Corey T. White, Center for Geospatial Analytics, NC State University

SOURCE CODE

Available at: r.dem.icp source code (history)

Accessed: Sunday Sep 13 08:27:42 2026


Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual