Learn R Programming

aRchi (version 2.1.3)

simplify_skeleton: Simplify a skeleton by removing unnecessary cylinders

Description

Simplify a skeleton by removing unnecessary cylinders

Usage

simplify_skeleton(aRchi, seg_length = 0.1)

# S4 method for aRchi simplify_skeleton(aRchi, seg_length = 0.1)

Value

a aRchi file with the simplified QSM.

Arguments

aRchi

an object of class aRchi containing at least a QSM.

seg_length

numeric. The target maximal cylinder length. See details.

Details

Simplifies a QSM by merging short cylinders into longer cylinders with a length close to a user defined target length. Note that short cylinders are kept if they support a branching point so that the overall QSM geometry is not affected by the simplification process.

Examples

Run this code
# \donttest{
# import a point cloud
tls=system.file("extdata","Tree_2_point_cloud.las",package = "aRchi")
tls = lidR::readLAS(tls)

aRchi = aRchi::build_aRchi()
aRchi = aRchi::add_pointcloud(aRchi,point_cloud = tls)

# build a skeleton from the point cloud
aRchi = aRchi::skeletonize_pc(aRchi)

# simplyfy the skeleton
aRchi = aRchi::simplify_skeleton(aRchi,seg_length = 0.05)

# plot the simplifyed skeleton
plot(aRchi,show_point_cloud = TRUE)
# }

Run the code above in your browser using DataLab