| Title: | Pointcloud Interactive Computation |
|---|---|
| Description: | Provides advanced algorithms for analyzing pointcloud data from terrestrial laser scanner in forestry applications. Key features include fast voxelization of large datasets; segmentation of point clouds into forest floor, understorey, canopy, and wood components. The package enables efficient processing of large-scale forest pointcloud data, offering insights into forest structure, connectivity, and fire risk assessment. Algorithms to analyze pointcloud data (.xyz input file). For more details, see Ferrara & Arrizza (2025) <https://hdl.handle.net/20.500.14243/533471>. For single tree segmentation details, see Ferrara et al. (2018) <doi:10.1016/j.agrformet.2018.04.008>. |
| Authors: | Roberto Ferrara [aut, cre] (ORCID: <https://orcid.org/0009-0000-3627-6867>), Stefano Arrizza [ctb] (ORCID: <https://orcid.org/0009-0009-2290-3650>) |
| Maintainer: | Roberto Ferrara <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.2.7 |
| Built: | 2026-06-05 07:54:25 UTC |
| Source: | https://github.com/rupppy/pic |
Computes metrics for individual trees and forest canopy from segmented point clouds.
Calculate_trees_metrics( woodpoint, a, AGB_def, Forest_floor, plot, filename, output_path, canopy_voxel_size = 0.1, min_canopy_height = 1.5, coverage_method = "mean_normalized" )Calculate_trees_metrics( woodpoint, a, AGB_def, Forest_floor, plot, filename, output_path, canopy_voxel_size = 0.1, min_canopy_height = 1.5, coverage_method = "mean_normalized" )
woodpoint |
Wood points (trunks and branches) with cluster attribute |
a |
Original point cloud |
AGB_def |
Non-wood (foliage) points |
Forest_floor |
Forest floor points |
plot |
Plot/output file prefix |
filename |
Original file prefix |
output_path |
Output directory |
canopy_voxel_size |
Voxel size for canopy analysis |
min_canopy_height |
Minimum height for canopy analysis |
coverage_method |
Coverage degree calculation method |
List containing tree metrics, canopy metrics, and file paths
Segments the input .xyz pointcloud file into different forestry layers: forest floor and above ground biomass.
Floseg(a, filename="XXX", soil_dim = 0.3, th = 20, N=500, output_path = tempdir())Floseg(a, filename="XXX", soil_dim = 0.3, th = 20, N=500, output_path = tempdir())
a |
- Input file (.xyz) |
filename |
- Output file prefix |
soil_dim |
- Voxel dimension (m) for forest floor segmentation - Default = 0.30 |
th |
- Minimum number of point to generate a voxel. Default = 20 |
N |
- Minimum number of voxel to generate a cluster. Default = 500 |
output_path |
Directory in cui scrivere i file di output. Default = tempdir() |
2 files (.txt) output. 1. Forest floor pointcolud; 2. AGB pointcloud
Segments an input .xyz point cloud file into different forestry layers (soil, wood, foliage), computes individual tree metrics, and provides summary statistics and canopy metrics.
Forest_seg( a, filename = "XXX", dimVox = 2, th = 2, eps = 2, mpts = 9, h_tree = 1, soil_dim = 0.1, N = 500, R = 30, Vox_print = FALSE, WoodVox_print = FALSE, output_path = tempdir(), analyze_canopy = TRUE, canopy_voxel_size = 0.1, min_canopy_height = 1.5, coverage_method = "mean_normalized" )Forest_seg( a, filename = "XXX", dimVox = 2, th = 2, eps = 2, mpts = 9, h_tree = 1, soil_dim = 0.1, N = 500, R = 30, Vox_print = FALSE, WoodVox_print = FALSE, output_path = tempdir(), analyze_canopy = TRUE, canopy_voxel_size = 0.1, min_canopy_height = 1.5, coverage_method = "mean_normalized" )
a |
Input point cloud data frame (.xyz) or file path |
filename |
Output file prefix |
dimVox |
Voxel dimension (cm) for wood segmentation (default = 2) |
th |
Minimum number of points to generate a voxel (default = 2) |
eps |
Epsilon neighborhood radius for DBSCAN (default = 2) |
mpts |
Minimum points required in eps neighborhood for core points (default = 9) |
h_tree |
Minimum trunk length in meters (default = 1) |
soil_dim |
Voxel dimension (m) for forest floor segmentation (default = 0.1) |
N |
Minimum number of voxels in a wood cluster (default = 500) |
R |
Cluster shape parameter threshold (default = 30) |
Vox_print |
Logical; if TRUE, saves point cloud voxelization (default = FALSE) |
WoodVox_print |
Logical; if TRUE, saves wood voxelization (default = FALSE) |
output_path |
Output directory (default = tempdir()) |
analyze_canopy |
Logical; if TRUE, performs canopy analysis (default = TRUE) |
canopy_voxel_size |
Voxel size for canopy analysis in meters (default = 0.1) |
min_canopy_height |
Minimum height threshold for canopy analysis (default = 1.5) |
coverage_method |
Method for calculating coverage degree (default = "mean_normalized") |
List containing file paths and metrics for trees and canopy.
Launch the Shiny app for interactive 3D point cloud processing.
run_PiC()run_PiC()
This function launches an interactive web application for analyzing forest point cloud data. The app requires additional packages that are not installed by default. If these packages are missing, you will be prompted to install them.
No return value, called for side effects (launches Shiny app)
## Not run: # Launch the interactive app run_PiC() ## End(Not run)## Not run: # Launch the interactive app run_PiC() ## End(Not run)
Wood - leaf segmentation of single tree
SegOne(a, filename = "Elab_single_tree", dimVox = 2, th = 2, eps = 1, mpts = 4, N = 1000, R = 30, output_path = tempdir())SegOne(a, filename = "Elab_single_tree", dimVox = 2, th = 2, eps = 1, mpts = 4, N = 1000, R = 30, output_path = tempdir())
dimVox |
- voxel dimension in cm - Default = 2 |
th |
- Minimum number of points to generate a voxel - Default = 2 |
filename |
- Output file prefix |
a |
- AGB voxelized input file |
eps |
- size (radius) of the epsilon neighborhood - Default = 1 |
mpts |
- number of minimum points required in the eps neighborhood for core points (including the point itself) - Default = 4 |
N |
- Minimum number of voxel in a wood cluster - Default = 1000 |
R |
- R = Standard deviation * Proportion of Variance - Default = 30 |
output_path |
Directory in cui scrivere i file di output. Default = tempdir() |
Two file (.txt) in output - Wood points and non wood points
Transform pointcloud in voxel
Voxels(a, filename = "XXX", dimVox = 2, th = 2, output_path = tempdir())Voxels(a, filename = "XXX", dimVox = 2, th = 2, output_path = tempdir())
a |
- input file |
filename |
- file output prefix |
dimVox |
- voxel dimension in cm - Default = 2 |
th |
Minimum number of point to generate a voxel (Default = 1) Is a parameter that should be used with caution; it generates a lightened cloud with fewer points. To be evaluated in relation with the dimVox parameter, for high point densities it is efficae to remove noise (outliers) |
output_path |
Directory in cui scrivere i file di output. Default = tempdir() |
Voxelized pointcloud
Point cloud segmentation to identify wood voxels
Woodseg(a, filename = "XXX", eps = 1, mpts = 4, N = 1000, R = 30, output_path = tempdir())Woodseg(a, filename = "XXX", eps = 1, mpts = 4, N = 1000, R = 30, output_path = tempdir())
filename |
- Output file prefix |
a |
- AGB voxelized input file |
eps |
- size (radius) of the epsilon neighborhood - Default = 1 |
mpts |
- number of minimum points required in the eps neighborhood for core points (including the point itself) - Default = 4 |
N |
- Minimum number of voxel in a wood cluster - Default = 1000 |
R |
- R = Standard deviation * Proportion of Variance - Default = 30 |
output_path |
Directory in cui scrivere i file di output. Default = tempdir() |
One file (.txt) output - Wood voxels (vox)