**4. Discussion**

#### *4.1. Feasibility of the Method*

In this study, a new fully automated tree-patch-delineation method using vegetation indices derived from RGB aerial photography was developed. Markers were delineated from vegetation indices, using Otsu's automatic thresholding method, followed by the depiction of patch boundaries with watershed segmentation. The accurate delineation of markers is the key to the success of the method. The accuracy of tree patch delineation is dependent on two major factors: first, the contrast between the target tree pixels and the background in the index image, and second, Otsu's automatic thresholding to separate target tree pixels from the background matrix. The efficiency of vegetation indices in producing contrast between target pixels and background is dependent in part on the aerial image itself. Thus, the method will be ineffective when vegetation indices are derived from aerial photographs with homogenous brightness values, as Otsu's automatic thresholding will work well only when the brightness intensity values of a vegetation index produces a bimodal distribution. If the contrast is not high enough, or the bimodal distribution captures other properties of the landscape that are uncorrelated to the target pixel vs. background, then unreliable and imperfect threshold values are generated. Consequently, the delineation of markers will result in under- or over-detection of markers.

Correct marker delineation is also dependent on the parameter values of morphological operations. The parameters used for marker delineation were opening iterations, MKS, dilation iterations, and DTC. Morphological opening can be iterated and requires a kernel. It was found that increasing the number of iterations decreased the overall accuracy of tree detection as a direct consequence of incorrect marker delineation. This is to be expected because additional morphological openings not only remove noisy pixels from the tree patches but also valid tree pixels that resulted in a decline of marker delineation. Although dilation is the process to recover the objects of interest (i.e., mangrove trees) using the same kernel size, it cannot recover small objects that are completely removed by erosion [56]. In general, one iteration of morphological opening promoted higher overall accuracy (Figure 7a). The overall accuracy is high across all index images in watershed segmentation when MKS was 3 (Figure 7b), while an MKS of 5 removed actual tree pixels that led to significant decline in the overall accuracy (Figure 7b). The effect of the number of dilation iterations and DTC on marker delineation varies among index images. We therefore recommend using optimum values for these parameters based on the index image used for delineation of markers. Our results show that these indices obtained high overall accuracy and performed equally well when compared to each other except for VDVI (error bar overlap in Figure 7a–d). Although we found the best parameter values to use with these vegetation indices for marker detection, the values are specific to the geographical context of the acquired images. Therefore, the values should be used as a guide when this method is applied elsewhere, as optimal parameter values may change, because of lighting conditions that alter the contrast between foreground and background, or the heterogeneity of the vegetation matrix in which the trees are embedded.

Point-based accuracy showed that models of seven indices matched the proportional area estimate with overall accuracy estimates above 90%. The highest overall accuracy was obtained using GRB\_ns model (93.4 ± 0.5%), and the highest producer's accuracy and user's accuracy were obtained using ExG\_s (87.4 ± 1.2%) and GRB\_ns (90.1 ± 1.2%) models, respectively. The object-based assessment indicated that the agreemen<sup>t</sup> between predicted and reference tree crowns was higher for the ExG\_s (95%) when compared to the GRB\_ns (88%) (Table 6), with a 7% lower omission error (Table 6, Figure 8).

Although there was little difference in the proportional area estimate between GRB\_ns and ExG\_s models, the average patch sizes of GRB\_ns were three times larger than those of the ExG\_s model, and in turn the GRB\_ns model detected 1048 patches compared to 2600 detected by ExG\_s. This indicates that GRB\_ns grouped individual neighboring patches into a single larger patch (Figure 9), and therefore, we recommend the use of ExG\_s when detection of individual trees is desired.

**Figure 9.** ExG\_s (yellow polygons) obtained better separation between patches and shadows compared to GRB\_ns (red polygons). ExG\_s detected more trees inside clumped mangrove patches (number of yellow polygons inside a single red polygon). ExG\_s also detected more isolated trees (yellow polygons without corresponding red polygons).

Shadow removal produced a mixed effect on delineation of tree patches. The commission errors in GRB\_s were concentrated in transition areas that were shaded, removing shadows lead to a 2.5% increase in user's accuracy in GRB\_ns (Table 5). However, removing shadows from ExG\_s, though increasing user' accuracy by 2.1%, also eliminated many tree pixels along with shadows, thereby reducing producer's accuracy by 2.8% (Table 5). Since shadow removal is problematic with the current method, the vegetation index that performs best without shadow removal is preferred. An algorithm that corrects reflectance in shadow areas rather than removing shadow pixels should be developed to minimize the effect of shadows on tree detection and delineation. The ExG\_s separated tree patches from shadows well without removing shadows (Figure 9). Most of the commission error for the ExG\_s model occurred near the transition between the crown boundary and marsh matrix pixels (Figure 9). Unlike near the center of the tree crown, where the green intensity values are more homogenous, the separability in such transitional areas becomes more difficult because of the mixture of tree and marsh pixels. This uncertainty in boundary interpretation carries over to the manual digitization process, where some error is associated with imprecise digitization of tree boundaries. However, this source of error only marginally affected the proportional area estimation.

#### *4.2. Comparison with Other Studies*

In this study, we showed that our methodology is robust, efficiently achieving very high detection and delineation accuracies for mangrove patches in a graminoid background matrix. We identified individual patches of mangroves, consisting of either single or multiple crowns. Separation of each individual tree crown within a mangrove clump is not possible because of low contrast along neighboring tree boundaries in aerial photographs. For convex tree shapes or diverse tree heights in forests, height information may increase the performance of the watershed algorithm when delineating individual trees. However, using LiDAR derived height information, Yin et al. [49] achieved a detection accuracy of 76.9% for isolated trees but overall crown delineation accuracy was only 46%. Delineation of individual mangrove crowns with large branches can sometimes cause incorrect splits of single crowns into multiple trees. Applying size filters on optical data or height filters on LiDAR data may address some of these issues [61]. The combination of high-resolution spectral imagery and high-density LiDAR data may improve delineation of isolated and individual trees in patches, but this approach is limited for change detection because of the temporal coverage of LiDAR data.

Detection of encroachment or loss of woody vegetation in savannahs, prairies, other grasslands, and woodlands is of interest to many ecologists, and natural resource and protected area managers. Several studies have mapped the woody encroachment in grasslands such as savannah using multi-spectral imagery [62–64]. To understand the pattern of woody vegetation changes in grasslands, and graminoid wetlands requires detection of new emergence and growth of new trees at the individual tree level. Our method specifically aims at detecting these kinds of vegetation dynamics and can be applied to conduct studies that are interested in changes of woody vegetation in a graminoid dominated landscape.

#### *4.3. Future Work and Challenges*

In the small, homogenous, red mangrove-dominated wetland in which this pilot project was carried out, the method worked well for single isolated tree detection, tree patch delineation, and cover estimation, but not as well in delineation of individual tree crowns inside patches containing several clumped trees. With advances in technology to acquire very high resolution (sub-decimeter) images in the future, this method provides an opportunity to conduct baseline studies for long-term monitoring of woodlands. The results we achieved also provide a foundation for estimating and monitoring temporal changes in mangrove cover.

Some challenges may arise when applying this method to images acquired in different wetland settings or from aerial photography that has different spectral, radiometric, and spatial resolutions. First, not all wetlands exhibit as distinct a bimodal distribution as the area selected for this project. More sophisticated methods may need to be developed to threshold the multi-modal distribution of pixel brightness values from more heterogeneous landscapes. Second, images that enhance the contrast between grasses and trees are preferable. Because contrast is enhanced when trees are foliated and graminoid species are senescent, dried up, or dead, image acquisition time should be determined based on the phenological cycles of the dominant graminoids and the tree species of interest. Third, although older aerial photographs have high spatial resolution compared to medium-resolution multi-spectral images, their spatial resolution is low compared with the image used in this research. For meaningful comparison in change detection studies, more recent very-high resolution images may have to be downscaled to the resolution of older aerial photographs. Fourth, this method incorporates the usage of true color aerial image, therefore, use of infrared and panchromatic aerial images would require further modifications.
