Clicky

7  Quantitative Structure Model

Arbor’s QSM engine was designed with one objective in mind: processing large-scale forest datasets automatically and reliably.

Unlike traditional workflows, where a handful of trees are manually extracted, cleaned, and reconstructed one by one, Arbor operates at a completely different scale. Its goal is to generate tens of thousands of QSMs at a pace of roughly 10 3D models per second, with no human intervention, even when segmentation is imperfect and many detected trees are small, leaf-on, or otherwise difficult to measure.

This chapter presents the principles, algorithms, and design choices behind Arbor’s QSM engine. Understanding these internals helps explain both the strengths of the approach and the data requirements needed to achieve reliable measurements at scale.

7.1 RANSAC Orbicular Fitting

Trees do not have the courtesy to be perfectly circular, that would be too simple. Circle/cylinder fitting can under-perform because trees deviate from perfect shapes. To better measure tree sizes, we designed an Orbicular Fitting (OF) method. The word orbicular refers to biological shapes that are circular-ish, which is precisely the shape of trunks and branches.

For a given cross section of a trunk or branch, we attempt at least three fitting methods and retain the best result:

  • RANSAC circle fitting. Circle fitting MUST be RANSAC-based. Least-squares fitting is unreliable under noisy conditions.
  • RANSAC ellipse fitting. Ellipse fitting MUST also be RANSAC-based.
  • Complex closed polygon fitting based on Fourier Harmonic Decomposition (FHD).

Ultimately, our QSMs are cylinder-based, so all fitted shapes are converted into area-equivalent circles. This is demonstrated in the figure below, where OF is applied to various shapes and identifies the best fit. The fitted shape is shown in red; the area-equivalent circle used to build the QSM is shown in purple. Using area-equivalent circles ensures that volumes are preserved while simplifying the shapes.

Various cross sections. The fitted shape is shown in red; the area-equivalent circle used to build the QSM is shown in purple.

Various cross sections. The fitted shape is shown in red; the area-equivalent circle used to build the QSM is shown in purple.

The reader may wonder: if any shape can be fitted with FHD, then circles and ellipses are merely special cases of FHD and therefore redundant.

This is technically true, and some studies have relied exclusively on FHD. However, Arbor is a production tool that must be robust to real-world data, not just benchmark data. FHD is really weak when data is incomplete (trees not fully sampled, classification errors). It is also sensitive to noise, and underperforms in general unless the input data is really clean. RANSAC circle fitting, on the other hand, is extraordinarily robust when well-designed, though less accurate when shapes deviate significantly from circular.

OF finds the most robust fit available. When a clean, arbitrary shape can be reliably fitted, OF retains it, but it falls back to a more robust alternative when necessary, as illustrated below where an ellipse was selected as the best fit.

7.2 Skeleton

For the skeleton reconstruction, Arbor draws inspiration from the aRchi R package (Martin-Ducup et al., 2020). We reimplemented the core idea in C++ for scalability and introduced several improvements to enhance branch-tracking capabilities.

Like aRchi, the point cloud is first clustered into layers. Unlike aRchi, which uses horizontal layers, we instead create layers based on the geodesic distance to the ground. Compared with horizontal layering, this approach naturally aligns with branch orientation, significantly improving the second processing step.

As in the original aRchi method, each layer is then analyzed and subdivided into clusters using dbscan.

Point cloud colorized by (a) solid brown (b) geodesic distance to the ground, illustrating the shortest-path metric used for layering; (c) initial clustering into layers based on geodesic distance to the ground; and (d) final clustering obtained by subdividing each layer into individual disconnected clusters.

Point cloud colorized by (a) solid brown (b) geodesic distance to the ground, illustrating the shortest-path metric used for layering; (c) initial clustering into layers based on geodesic distance to the ground; and (d) final clustering obtained by subdividing each layer into individual disconnected clusters.

For each cluster, the centroid is estimated using either Orbicular Fitting or the barycenter, depending on whether a reliable Orbicular Fitting solution can be obtained. This yields all the nodes of the QSM skeleton.

Cluster centroids reconstructed from layered point-cloud segments. Centroids are estimated using Orbicular Fitting whenever possible and fall back to the barycenter when fitting is unreliable.

Cluster centroids reconstructed from layered point-cloud segments. Centroids are estimated using Orbicular Fitting whenever possible and fall back to the barycenter when fitting is unreliable.

Finally, nodes are connected using a greedy chain-growing strategy, which is the original aRchi connection method and is arguably more robust than classical state-of-the-art graph-based approaches such as Minimun Spanning Tree (MST) or PST, often found in the literature. This is not to say that MST or PST are poor methods; rather, globally optimal solutions do not scale robustly to real data because they are highly sensitive to gaps and other imperfections commonly found in point clouds. In contrast, the aRchi method is a locally optimal solution that reconstructs trees based on growth logic, making it inherently more suitable for tree structures. We did not modify the method itself; we simply reimplemented it efficiently.

Reconstructed tree skeleton colored by branch order. The topology is obtained by greedily connecting nodes according to the original aRchi growth-based strategy.

Reconstructed tree skeleton colored by branch order. The topology is obtained by greedily connecting nodes according to the original aRchi growth-based strategy.

7.3 Preshot QSM

The QSM algorithm first computes a preshot QSM. This preshot QSM is generated virtually instantaneously without taking any measurements. Using the height of the tree, the routine estimates a plausible DBH from allometric relationships and linear stem tapper decrease to the tip.

The goal of the preshot QSM is not to be accurate. Virtually any reasonable allometric relationship between height and DBH could work. The objective is simply to obtain a plausible tree model without performing any expensive computations. By default, Arbor uses the equation from Griese N. et al. (2025) to estimate DBH from tree height.

For the example shown below, this relationship substantially underestimates the true size of the tree.

Relationship between DBH and tree height from Griese et al. (2025). Blue annotations highlight our example tree used in this book

Relationship between DBH and tree height from Griese et al. (2025). Blue annotations highlight our example tree used in this book

However, this is not an issue. The preshot QSM is used only as a computational optimization tool. Despite being volumetrically inaccurate, it contains valuable information that can dramatically reduce processing time.

Among other things, it provides an estimate of the large proportion of nodes that are too small to be measured reliably. There is no need to spend computational resources attempting to measure structures that are, in practice, below the measurable limit of the sensor. In this example, the preshot QSM predicts that 26,000 out of 29,000 nodes (90%) are likely smaller than 2 cm in diameter. As a result, more than 90% of the measurement effort can be skipped. Even if the allometric prediction is inaccurate and the actual cross-sections are somewhat larger, the impact on the optimization strategy remains gigantic. We can roughly bypass 90% to 95% of the CPU effort initially required.

The preshot QSM also indicates whether complex buttress detection should be activated, or whether computation time can be saved by desactivating it. Restricting Orbicular Fitting to simpler geometric shapes reduces computation time.

Example of a highly inaccurate preshot QSM. Although volumetrically incorrect, it provides valuable prior information used to prune unnecessary computations and guide subsequent fitting strategies.

Example of a highly inaccurate preshot QSM. Although volumetrically incorrect, it provides valuable prior information used to prune unnecessary computations and guide subsequent fitting strategies.
Warning

We are aware that many readers may be reluctant to use allometry, especially curves that may not fit their country or specific local context. It is true that generic equations are not representative of local conditions.

For this reason, we want to emphasize once again that this is only a preliminary QSM, which is not used in the computation of the final QSM. It is only used as a computational trick to optimize processing. And we carefully chose a tree to illustrate the book that if completely off prediction to demonstrate that the allometry has little importance.

7.4 Diameters

Using the Orbicular Fitting approach and the skeleton’s cylinder orientations, we measure diameters wherever possible. Cylinders with poor fitting, insufficient points, or diameters too small to measure reliably are skipped or discarded. In the example used in this book, 257 valid measurements (v0.14.0) were retained along the main axis and major branches. Other measurements were considered too weak to be retained.

The algorithm measured 257 cylinders where robust measurements are possible. Other cylinders are left unknown due to weak RANSAC fitting or unmeasurable allometric predictions. The total measured volume is 3.55 m³.

The algorithm measured 257 cylinders where robust measurements are possible. Other cylinders are left unknown due to weak RANSAC fitting or unmeasurable allometric predictions. The total measured volume is 3.55 m³.

The gaps are then interpolated. These interpolated gaps provide highly reliable estimates.

Gaps are filled by interpolating between the valid measurements. The total volume at this stage is 3.82 m³.

Gaps are filled by interpolating between the valid measurements. The total volume at this stage is 3.82 m³.

Branches that cannot be measured are reconstructed hierarchically using a pipe model. This ensures that unmeasurable sections, which are entirely speculative, are grounded in biological theory.

While there is much to be said about pipe models and their biological validity, in practice, the pipe model helps to reconstruct a small volumetric fraction of the tree in a highly realistic way and based on strong upstream measurement. Pipe model is virtually instantaneous to compute.

This approach avoids attempting to measure what cannot be reliably captured, thereby saving time and increasing robustness by eliminating erroneous data points. The reconstructed sections rely on multiple reliable anchor measurements, making the entire process both robust and accurate.

Final QSM: 4.91 m³

Final QSM: 4.91 m³
Nodes (%) Volume (m³) (%) Cumulative (m³) (%)
Measured 257 (0.8%) 3.55 (72%) 3.55 (72%)
Interpolated 102 (0.3%) 0.25 (6%) 3.82 (78%)
Pipe Model 28,661 (98%) 1.09 (22%) 4.91 (100%)

7.5 Extension to the Ground

The QSM initially misses 15 to 50 cm because the point cloud was cut above the ground during data preparation (Section 4.2). Arbor uses the recorded Height Above Ground (HAG) from the point cloud and the skeleton orientation to extend the QSM realistically to the ground, even for bent or non-straight trees.

7.6 Non-measurable Trees

Arbor segments and builds QSMs for saplings and small trees whose sizes fall below the measurable limits of point clouds. Typically, a 4 m tree is expected to have a diameter of approximately 3 cm. It may be slightly smaller or slightly larger, but in all cases, accurate measurement with MLS is physically infeasible. Worse, it is dangerous.

With thousands of tiny, highly intricate saplings covered in foliage, attempting manual measurements would inevitably lead to false measurements and poor 3D reconstructions in many cases.

Note

In this sense, Arbor differs from other QSM software such as AdTree, TreeQSM or Computree. Other software expects a single input tree that has already been verified by the user as a valid and well-segmented tree. They produce few errors because no user in the world feeds them with noisy, intricate, 3 meters saplings.

Arbor, on the other hand, batch-processes hectares of forest and is automatically fed with all saplings, segmentation errors, and noise, at a pace of 10 QSMs per second for thousands of QSMs, with no guarantee that the input is perfectly segmented. Arbor must therefore remain robust in all cases.

In such cases, we rely on allometry. By default, Arbor uses the equation from Griese N. et al. (2025) to estimate DBH from tree height. If the predicted DBH falls below a given threshold, the standard QSM algorithm is not applied. Instead, an had oc QSMs is built from the theoric DBH and the skeleton.

The default threshold is 6 cm, which ensures that saplings and other non-measurable trees are modeled realistically. Forcing a direct measurement would lead to significantly worse results. Although the relationship between height and diameter is species- and biome-specific, inter-species variation within this size range is assumed to be limited.

Image from Griese N. et al. (2025) with annotations for the book. Scatter plot showing the relationship between DBH and tree height. Blue annotations were added to highlight the range of trees not actually measured by Arbor.

Image from Griese N. et al. (2025) with annotations for the book. Scatter plot showing the relationship between DBH and tree height. Blue annotations were added to highlight the range of trees not actually measured by Arbor.
Important

The allometry is NOT used to build standard QSMs. It is used only to discriminate between trees that can be measured and those that cannot, in order to build a plausible 3D model in these specific cases.

The accuracy of the allometric model is therefore not critical. Trees that are measurable will still be reconstructed properly even with an inadequate allometric model. Purely allometric QSMs are flagged and generate a warning so users can easily identify them.

7.7 Non-measurable Trees - edge cases

In some very specific cases, however, this approach reaches its limits. For example, we modeled a cacao plantation in Cameroon where the trees are heavily managed and differ substantially from those represented in the Griese et al. model. Typically, a 5 m tall tree may have a diameter of 12 cm, whereas the Griese et al. model predicts approximately 4.5 cm, an underestimation by a factor of about 2.5 to 3. Moreover, all the trees are approximately 5 m tall. As a consequence, most trees are incorrectly flagged as non-measurable and are therefore not measured using the standard QSM pipeline.

Overall the approach described in previous section may fall short in non-forested areas such as plantations of fruit trees, urban areas, heavily managed trees where small trees can become particularly big compared to typical forest trees of the same height that compete differently for ressources.

In such cases, parameter tuning becomes mandatory. Users can select an alternative allometric model, lower the minimum detectable DBH or scale one existing model. For the cacao plantation we scaled Griese’s model by a factor of 2.5. Again, the accuracy of the model is NOT critical. We simply scaled the Griese et al. model to ensure that measurable trees are no longer excluded.

params$qsm$allometry_name = "Griese2025"
params$qsm$allometry_scale = 2.5
params$qsm$min_measurable_dbh = 0.04

available_allometries()

7.8 Broken Trees

Broken trees do not follow the typical rules. They are often small in height but can still have a large diameter, and they do not terminate with a near-zero radius. Under the previous rules (Section 7.6), a broken tree may be classified as small in height, leading to a predicted DBH below the measurement threshold. As a result, the tree is not measured, allometry is applied, and the tree is consequently severely under-sized.

In practice, the internal routine includes safeguards. Without going into implementation details, the general idea is to detect enough valid and sufficiently large measurements to bypass the regular algorithm and instead use an alternative approach that is less sensitive to missing tips.

Caution

Broken tree detection is experimental because of the lack of a large dataset of broken trees for validation. It can be disabled with params$qsm$broken_detection_enabled = FALSE.

A broken tree and its QSM

A broken tree and its QSM

7.9 Fitting Quality Assessment

The QSM records a quality attribute (accessible via qsm$quality) that indicates the quality of radius fitting. The codes are defined as follows. The associated colors are arbitrary and correspond only to the figure below; the default color scheme may change in future versions.

  • 0 – Unknown: Undefined state. This is a bug, it should never occur.
  • 1 – Prolongation: (blue) The segment belongs to the prolongation region (see Section 7.5). No points are available in this region, therefore no measurements can be performed.
  • 2 – Reconstruction: (green) No measurements are available. Radii are reconstructed purely from architectural assumptions based on pipe model. Equivalent to poor quality.
  • 3 – Interpolation: (yellow) No direct measurements are available, but we are between valid measurements. Interpolation provides serious plausible radius estimates. Equivalent to medium quality.
  • 4 – Good Orbicular Fitting: (orange) A valid measurement is available, but it does not meet the criteria for top-quality fitting. This typically occurs when either full 360° coverage is missing or the inlier-to-outlier ratio is insufficient. Equivalent to good quality.
  • 5 – Excellent Orbicular Fitting: (red) Full high-quality orbicular fitting. Few outliers. Equivalent to excellent quality.
plot(qsm, color = "quality")

Radius fitting quality classes used in the QSM. Colors are illustrative only and do not represent a fixed or permanent color scheme. Blue: prolongation; Green: reconstuction; Yellow: interpolation; Orange: good measurement; Red: exellent measurement.

Radius fitting quality classes used in the QSM. Colors are illustrative only and do not represent a fixed or permanent color scheme. Blue: prolongation; Green: reconstuction; Yellow: interpolation; Orange: good measurement; Red: exellent measurement.

7.10 Message

In version 0.14.0, the function qsm() can throw four warnings:

  • For non-measurable trees because they are too small and therefore not reliably measurable (Section 7.6).
  • For insufficient measurements.
  • For measured root diameters more than 3 times greater than the expected DBH based on allometry assumption. We are so far from expectation that a manual check may be required.
  • For broken tree detection.

It is possible to retrieve the warning emitted by a QSM with qsm_message(). This section written in June 2026 may become out of sync when the reader is reading these pages but qsm_message() will remain a valid command.

7.11 Other Details

We have not gone into depth about how the architecture is recomputed, how the quality of the RANSAC Orbicular Fitting is assessed, how errors near the base of the tree are handled for robustness, or how unnecessary computations are skipped. Throughout this book, many such details are intentionally omitted. Otherwise, the book would be endless, and the effort required to explain and illustrate every single step would be colossal. Our goal here is to present the overarching concepts to provide a clear overall understanding.

One interesting feature is the ability to handle problematic situations at the base of trees. Semantic segmentation is not perfect, and even when it is perfect, the forest does not have the courtesy to conform to our reconstruction rules. In the example below, a tree has fallen between a forked tree. The wood classification is correct, the irregular structure at the bottom is indeed wood, and it is technically connected to the tree of interest. From a segmentation standpoint, this is valid. However, such a structure would break the QSM reconstruction.

As shown in the image, our QSMs remain robust in these situations and are extended to the ground without following the fallen trunk.

7.12 Final Note

Arbor’s QSMs are designed to be fast and robust. We are no longer dealing with single trees manually extracted and carefully inspected before generating one QSM at a time. Instead, Arbor is built to process tens of thousands of QSMs automatically, in contexts where semantic and instance segmentation are imperfect, and where 90% of instances may be leaf-on, non-measurable saplings.

To achieve this, Arbor’s QSM module is intentionally strict and highly conservative in what it considers a valid measurement. As a rule of thumb, if a tree is only partially sampled and Arbor fits a valid circle to a half cross-section, the measurement may still be rejected, even if the fit itself is correct (RANSAC is highly robust). For this reason, trees should be sampled over 360 degrees.

Partially scanned trees, such as those commonly obtained from TLS data, may be technically measurable, but Arbor will generally fail to measure them reliably. A warning should be issued when Arbor detects poor overall measurement quality.

As stated in previous chapters: production-grade software requires production-grade data.

7.13 Code

7.13.1 Minimal snippet

If readers have followed the book so far, they should now have a variable las in which every tree has been segmented, each with its own unique ID. The following code sample selects a random tree, computes its QSM, and plots the result. Loop over all trees is done via the qsf() function (Chapter 8).

# Sample a random tree
id   <- sample(unique(las$treeID), 1)
tree <- lidR::filter_poi(trees, treeID == id)

qsm  <- qsm(tree)
x <- plot_semantic(tree)
plot_qsm(qsm, add = x)
Tip

A qsm object is simply a data.frame with an additional class to enable convenient printing and plotting methods. Use as.data.frame(qsm) to manipulate a QSM as a data.frame.

7.13.2 Function list

  • qsm() to build a QSM
  • qsm_dbh(), qsm_volume() to extract DBH and Volume
  • qsm_stats() to extract various useful informations from the QSM.
  • qsm_write() for saving the QSM in .qsm, .obj, .ply, stl, .csv for analyzing or for rendering in 3D software. We recommend .qsm for storing and .obj for rendering in third-party 3D software.
  • qsm_read() to read .qsm or .csv.
  • qsm_message() for logs.
  • qsm_merchandable(), qsm_stem() (see Chapter 9)
  • plot_qsm() or plot() for 3D rendering

7.13.3 Full Code

library(lidR)
library(arbor)

params <- arbor_parameters_default
params$global$cut_above_ground = 0.25
filter <- "-keep_random_fraction 0.25"

las <- readTLS(file, select = "xyz", filter = filter)

las <- hybrid_homogeneization(las)
las <- segment_ground(las)
las <- wood_likelihood(las, params)
las <- segment_semantic(las, params)
see <- find_seeds(las, params)
las <- segment_instance(las, see, params)
las <- flag_small_trees(las, max_height = 2)
las <- flag_buffer(las, see, -buffer)

# Sample a random tree
id   <- sample(unique(las$treeID), 1)
tree <- lidR::filter_poi(las, treeID == id)

qsm  <- qsm(tree, params)
x <- plot_semantic(tree)
plot_qsm(qsm, add = x)