## 2 Data and Method
### Methods
#### 2.2.6 Tree Species Classification
(**g**) The combination of sector and rectangle from top to bottom. (**h**) The combination of triangle and rectangle from top to bottom. (**i**) The combination of sector, rectangle and triangle from top to bottom. (**j**) The comb-ination of triangle, rectangle and triangle from top to bottom. From (3), the crown shape can be described by the key points, and the key points can be sorted in descending order by the \(Z\) value of the key points. Starting from the top of the tree, parallel lines are divided along the direction of the tree stem, which can be defined as the vertical line connecting the top of the tree crown and the root ground point. As shown in Figure 14, the intersection points of the parallel line and the line segments of the key points are calculated. The horizontal distance of the intersection points is the length of the line segment. The length of the intersection line of each line segment is recorded, and the length of adjacent line segments is compared, as in the following situation:  
Figure 11: The generation of the profile points of the tree crown, \(X^{\prime}\) is the direction of the profile. Figure 12: Using the alpha shapes algorithm to get the shape of the tree crown, and the red spots are the edge points. Figure 13: The process of the key point generation. The green point defines the key point and the purple one is the unkey point. (b-1) As Figure 14 shows, if \(i=1\), the line segment \(A_{i}B_{i}\) is signed red. (b-2) Take any line segment \(A_{i}B_{i}\), and the length of the line segment \(A_{i}B_{i}\) is signed as \(L_{AiBi}\) ; if the \(L_{Ai\_IB:1}<L_{AiBi}<L_{Ai+1 Bi+1}\) or \(L_{Ai-1 Bi-1}>L_{AiBi}>L_{Ai+1 Bi+1}\) (\(i>1\)), then the line segment \(A_{i}B_{i}\) is signed red; otherwise the line segment \(A_{i}B_{i}\) is signed green. (b-3) After coloring the line segments, if \(A_{i-1}B_{i-1}\) and the following \(N\) (\(N>2\)) line segments all have the same color red (green), and the \(A_{i}B_{i}\) is green (red), then change the color of \(A_{i}B_{i}\) to red(green). If \(i=1\), and the following N line segments have different colors, then change the color of \(A_{1}B_{1}\). From Figure 14, using the line segments color, the shapes of the tree crowns can be classified into two basic shapes, namely triangles and rectangles. Triangles are further classified into triangles, trapezoids and sectors. (c-1) Continuous red line segments are grouped and defined as triangular basic types. Similarly, continuous green line segments are defined as rectangular primitives as Figure 15-(3) shows. If there are one or two separate segments that are not defined, the segments are merged into the nearest basic shape, as Figure 15-(1)shows. Figure 14: The processing of the tree crown shape fitting. (**a**) The intersection of the parallel line and the line segments of the key points. (**b**) The trapezoid is finally confirmed from triangle. (**c**) The sector is finally confirmed from triangle. (c-2) Among the triangular basic shapes, if the shortest line segment is more than \(\mathrm{D_{T}}\), then the shape can be defined as a trapezoid. If the shortest line segment is less than \(\mathrm{D_{T}}\), the shape is defined as a triangle or an arc. as Figure 15-(2) and (4)shows. (c-3) In the triangle basic type, the end points of the top and bottom line segments on the same side are connected, and the line defined as \(L_{l}\) or \(L_{r}\). If the endpoints of the line segments on the same side are evenly distributed on both sides of the line \(L_{l}\) or \(L_{r}\), it indicates that the shape is a triangle. If most of the end points of the line segments, i.e., \(P_{T}\%\) are outside the line, it indicates that the shape is an arc, as Figure 15-(4)shows. (c-4) As for the shape \(d\) in Figure 10, the entire shape is a triangle shape, but in the step c-3, in the upper part, the endpoints are almost outside the \(L_{l}\) or \(L_{r}\), and in the lower part,  
Figure 15: The shape fitting of different tree crowns. (**1**)–(**4**) shows the fitting process of the basic shape of the crown.