Hi Pedro,
I understand that you are working with the Extraction of Forest Metrics and Individual Tree Attributes example to detect tree tops from a Canopy Height Model (CHM), and that certain trees which are visually distinct are not being marked by the 'detectTreeTops' function. It is observed that varying 'gridResolution' and 'MinTreeHeight' improves results to some extent, yet some trees remain undetected, particularly when multiple canopies are close together and are segmented as one.
You can consider the following possible influencing factors while working with LiDAR-based tree segmentation workflows in MATLAB:
- CHM resolution: Coarser resolutions can merge nearby canopy peaks, while overly fine grids may introduce noise.
- 'WindowSize' parameter in 'detectTreeTops': Larger values merge adjacent trees, whereas smaller values can detect noise as trees.
- Smoothing or filtering: Excessive smoothing on the CHM can remove smaller peaks before detection.
- Local maxima detection limitations: Overlapping crowns may not produce distinct peaks in the CHM, causing under-detection.
It could be a good practice to experiment with smaller 'WindowSize' values and different CHM resolutions to better separate adjacent trees. Preprocessing the CHM with lighter smoothing or applying segmentation algorithms such as 'watershed' on the CHM can also improve results.
For example:
treeTops = detectTreeTops(chm, ...
If you have control over CHM preprocessing, you can also try the following snippet:
chmFiltered = imgaussfilt(chm, 0.5);
treeTops = detectTreeTops(chmFiltered, ...
Fore more information regarding various functions and parameters mentioned in the given code snippet, you can refer to the following documentation links: