## 2 Materials and Methods
### Methodology
#### 2.3.2 ITD and Seed Points Detection under Leaf-Off Conditions  
To extract seeds from UAV-LiDAR data of the leaf-off season, three reliable methods were tested (Figure 4). The first method is commonly applied and uses a local maximum filter algorithm on the CHM images [55]. This method has been shown to have high accuracy for ITD in coniferous forests based on different types of LiDAR data [25]. A median value based on 7 \(\times\) 7 pixel moving windows was chosen in this study using the _focal_ function in the raster package of R software. Because the CHM image has a spatial resolution of 0.1 m, the actual size of this smoothing window is 0.7 \(\times\) 0.7 m. The local maximum algorithm was then performed in the smoothed CHM to identify treetops (Figure 4a) based on a fixed circle window. The size of this circle affects the accuracy of ITD, so we tested multiple window sizes adjusted to tree spacing in each plot and selected the size with the best detection performance (Table 2).  
\begin{table}
\begin{tabular}{c c c c} \hline \multirow{2}{*}{**Plot**} & \multicolumn{2}{c}{**Local Maximum–**} & \multicolumn{2}{c}{**Local Minimum–**} & \multicolumn{1}{c}{**Mean Shift–**} \\  & **Diameter (m)** & **Diameter (m)** & **Bandwidth (m)** \\ \hline Y8-1 & 5.5 & 5.5 & 2 \\ Y11-1 & 5.5 & 5.5 & 2 \\ Y12-1,2 & 5 & 5 & 1.7 \\ Y14-2,4 & 5 & 5 & 2 \\ Y16-1,2,3 & 6 & 6 & 2.5 \\ Y17-1,2 & 6 & 6 & 2.5 \\ Y20-3 & 6 & 6 & 2.5 \\ \hline \end{tabular}
\end{table}
Table 2: Parameters of three ITD methods among sample plots in the leaf-off season. (Local Maximum: a local maximum filter algorithm on the CHM; Local Minimum: A local minimum filter algorithm on the normalized point cloud data; Mean Shift: a local density maxima detecting algorithm on the horizontal point cloud data).  
Figure 4: ITD and seed extraction through a local maximum algorithm (**a**), a local minimum algorithm (**b**), and a Mean Shift algorithm (**c**) in plot Y16-3 as an example. The yellow dots are seed points extracted by the algorithm in (**a**); the purple dots are seed points extracted by the algorithm in (**b**); the blue dots are seed points extracted by the algorithm in (**c**).  
The second method is a smoothing window filtering method that is often used to improve ITD accuracy in broadleaved forests [56]. Compared to the first method, this approach searches for the lowest point rather than the treetop for a single tree. This second method is often applied for bottom-up ITS methods, which have been shown to have better ITS performance for broadleaved forests for their potential to eliminate errors caused by complex canopy structure [44]. Specifically, a local minimum filter algorithm was conducted in the normalized point cloud data instead of the CHM image (Figure 4b). Circle window diameters for this second method were the same as those in the first method (Table 2) and both were run in the _locate_trees_ function from _lidR_ package in R software.  
The third method is a Mean Shift algorithm, a nonparametric feature-space analysis technique for detecting the local maxima based on a probability density function of the data [57]. Because it was applied by interactively shifting each point in the feature space uphill until it reaches a mode, all the points were classified into a cluster with the same mode. This approach is feasible for directly segmenting point clouds in 3D space [7; 47]. The primary parameter for this method is kernel bandwidth, which strongly impacts the cluster results. Instead of adopting this technique on the 3D point cloud directly, we projected the point clouds from the leaf-off season onto the horizontal plane (2D plane) first and then conducted the Mean Shift algorithm from the _sklearn_cluster_ library in Python (Figure 4c). In this way it skips vertical bandwidth selection. Various horizontal bandwidth parameters were tested by trial and error and the best horizontal bandwidth was selected for each plot (Table 2).