| Title: | ALS MLS and TLS forest plot alignment |
|---|---|
| Description: | Alignment of forest plots point clouds (ALS, ULS, MLS, TLS), including complex cases with significant misalignments. |
| Authors: | Jean-Romain Roussel [aut, cre] |
| Maintainer: | Jean-Romain Roussel <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.1.1 |
| Built: | 2026-06-01 17:12:40 UTC |
| Source: | https://github.com/r-lidar/lidRalignment |
The 'AlignmentScene' R6 class provides methods for aligning two 3D point clouds plots, typically from terrestrial (MLS/TLS) or aerial (ALS/UAV) LiDAR sources. It implements a multi-step alignment process with coarse, fine, and extra-fine alignment stages.
new()
Create a new AlignmentScene object.
AlignmentScene$new(fref, fmov, radius = 20, verbose = TRUE)
fref, fmovcharacter, path to the las laz file with the point cloud to align. fref is the reference point cloud, fmov is the point cloud to be aligned
radiusclip radius. The routine does not align the full point cloud but clip before to compute the registration matrix
verboselogical
A new 'AlignmentScene' object.
print()
AlignmentScene$print()
set_radius()
Set clip radius
AlignmentScene$set_radius(radius)
radiusnumeric.
set_ref_is_ground_based()
Tell the pipeline if the reference point cloud is ground-based (TLS, MLS)
AlignmentScene$set_ref_is_ground_based(val = TRUE)
vallogical
set_mov_is_ground_based()
Tell the pipeline if the moving point cloud is ground-based (TLS, MLS)
AlignmentScene$set_mov_is_ground_based(val = TRUE)
vallogical
prepare()
First function to run. It reads the point cloud, extract features, and performs raw alignment
AlignmentScene$prepare()
coarse_align()
Second function to run. It perform a brute force alignment
AlignmentScene$coarse_align(res = 2, max_offset = 10, debug = FALSE)
resnumeric. Subsampling resolution. Keep it as is.
max_offsetnumeric. Maximum translation possible. Increase if the point cloud are strongly missaligned on XY.
debuglogical. Displays rendering for debugging
fine_align()
Third function to run. It perform an ICP alignment
AlignmentScene$fine_align(overlap = "auto", ...)
overlapnumeric trimmed ICP overlap. Can be 10, 20, 30, 40 to 100.
...unused
extra_fine_align()
Fourth function to run. It perform an ICP alignment on the trunks
AlignmentScene$extra_fine_align(...)
...unused
align()
Full pipeline
AlignmentScene$align(res = 2, max_offset = 8)
resnumeric. Subsampling resolution. Keep it as is.
max_offsetnumeric. Maximum translation possible. Increase if the point cloud are strongly missaligned on XY.
plot()
Plot alignment
AlignmentScene$plot(
which = c("raw", "coarse", "fine", "extra"),
compare_to = which
)whichstring. The alignment level to plot
compare_tostring. The alignment level to plot and to compare
get_registration_matrix()
Get the registration matrix. This matrix is more or less accurate as a function of the level of registration performed
AlignmentScene$get_registration_matrix()
clone()
The objects of this class are cloneable with this method.
AlignmentScene$clone(deep = FALSE)
deepWhether to make a deep clone.
Prints translation and rotation angles from a 4x4 transformation matrix.
rtm_info(M)rtm_info(M)
M |
A 4x4 transformation matrix. |
None (prints results).
Applies a 4x4 transformation matrix to a LAS point cloud. The function can handle both LAS objects
and LAS file paths, transforming the point cloud data accordingly.
transform_las(las, M, crs = NULL)transform_las(las, M, crs = NULL)
las |
A |
M |
A 4x4 transformation matrix. |
crs |
Optional CRS to assign to the transformed LAS. Can be the epsg code, the wkt string or a sf crs object. |
A transformed LAS object. If a file path is provided for las, a new LAS file is created and returned.