| Title: | Synthetic Crook Deformations in Stem Point Clouds |
|---|---|
| Description: | Simulates parameterized single- and double-directional stem deformations in tree point clouds derived from terrestrial or mobile laser scanning, enabling the generation of realistic synthetic datasets for training and validating machine learning models in wood defect detection, quality assessment, and precision forestry. For more details see Pires (2025) <doi:10.54612/a.7hln0kr0ta>. |
| Authors: | Raul de Paula Pires [aut, cre] (ORCID: <https://orcid.org/0000-0001-6500-4289>) |
| Maintainer: | Raul de Paula Pires <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-02 07:44:37 UTC |
| Source: | https://github.com/raudep/crookr |
Backwards-compatible wrapper keeping your original name/signature
Create_Krok( tree_stem, krok_length = 0.5, krok_start = 4, krok_type = "2dir", krok_deviation = 0.1, inflektion_X = 1/4, inflektion_ext = 1/2, az = 0, spar = 0.8 )Create_Krok( tree_stem, krok_length = 0.5, krok_start = 4, krok_type = "2dir", krok_deviation = 0.1, inflektion_X = 1/4, inflektion_ext = 1/2, az = 0, spar = 0.8 )
tree_stem |
tree stem point cloud (lidR::LAS or data.frame) |
krok_length |
range of the deformation along the stem's length |
krok_start |
start height of the crook |
krok_type |
single- or double-directional deviation |
krok_deviation |
extent of the deviation |
inflektion_X |
placement of double directional deviation |
inflektion_ext |
placement of double directional deviation |
az |
numeric degrees. Azimuth of lateral rotation (0 = X axis, 90 = Y axis). Default 0. |
spar |
smoothing parameter for |
Same class as input (LAS or data.frame object with crook deformation)
Generalization of your Create_Krok() that supports lidR::LAS or
data.frames, arbitrary azimuth, and safer handling of edge cases.
crook_deform( x, krok_length = 0.5, krok_start = 4, krok_type = c("2dir", "1dir"), krok_deviation = 0.1, inflektion_X = 1/4, inflektion_ext = 1/2, az = 0, spar = 0.8 )crook_deform( x, krok_length = 0.5, krok_start = 4, krok_type = c("2dir", "1dir"), krok_deviation = 0.1, inflektion_X = 1/4, inflektion_ext = 1/2, az = 0, spar = 0.8 )
x |
LAS or data.frame with X,Y,Z (case-insensitive if data.frame). |
krok_length |
range of the deformation along the stem's length |
krok_start |
start height of the crook |
krok_type |
single- or double-directional deviation |
krok_deviation |
extent of the deviation |
inflektion_X |
placement of double directional deviation |
inflektion_ext |
placement of double directional deviation |
az |
numeric degrees. Azimuth of lateral rotation (0 = X axis, 90 = Y axis). Default 0. |
spar |
smoothing parameter for |
Same class as input (LAS or data.frame object with crook deformation)
A LiDAR-derived stem used in examples and tests.
A data frame with 3 variables:
numeric, meters (local coord)
numeric, meters
numeric, meters above ground
Points belong to a single Scots pine stem, pre-segmented.
Synthetic/field data prepared for the crookR package.
data(example_stem) head(example_stem)data(example_stem) head(example_stem)