Open chugom opened 1 month ago
The main parameter for increasing or decreasing the number of trees that is detected is winFun
. This is a function that sets the size of the search window based on the canopy height over which it is centered. In other words:
Input = CHM cell values Output = window radius
So a function like function(x){x * 0.06 + 0.5}
will yield a consistently wider search window than function(x){x * 0.06 + 0.1}
. A wider window will yield fewer trees. Adjusting the function's intercept will enlarge the window for all canopy heights, whereas adjusting the slope can tilt results for higher/lower sections of the canopy.
You also don't need to use a linear function. For forest stands dominated by tall, narrow conifers, I found that logarithmic functions (ex.: function(x){x * 0.06 + 0.5}
) work well.
However, coming up with an optimal function is not easy. I would recommend reading up the primary literature from Popescu and Wynne for a discussion on this. If you scroll down the ForestTools
README page, you'll also find many other studies that use this library and discuss parameterization.
Thank you for your feedback, I will review the various works. One last question: is it possible to aggregate or use the data captured by the DeepForest algorithm for canopy detection and use the results to refine the search for tree tops with the ForestTools algorithm?
I am primarily working with deciduous trees.
That's an interesting question, and something I've been wanting to explore myself (I haven't had a chance to try DeepForest myself yet). What I would probably try is:
vwf
function, and instead attempt to detect individual trees using DeepForestmcws
function that will then segment the trees using a watershed algorithmThis could potentially work, although I would expect step 2 might be problematic. Given that the bounding boxes are square, the highest point within them might belong to a neighbouring tree instead of the tree on which they're centered. You might have to think of some clever way of preventing this (turn the boxes into circles? use spatial weighting when looking for the local maxima?)
I'd be curious to know how this goes, if you end up attempting it.
If I have some time I will also try it, and I will be sure to get back to you.
Hello,
First of all, thank you for your work, it is top notch.
I tested the ForestTools library on a small area to check the finesse of the results. I counted the number of trees visible from a LAS viewer (CloudCompare), I have around 17 trees. I must have at least and maximum 17 tree tops, except that in the results I have 47 tree tops, and for the crowns there is too much cutting for the number of trees I am sure that there are parameters to adapt to refine the results, is it possible to help me to get as close as possible to a visible result on CloudCompare. Thank you.